This documentation is archived and is not being maintained.

Domain.FindAllDiscoverableDomainControllers Method (String)

Finds all of the discoverable domain controllers in this domain that are also in the specified site.

Namespace:  System.DirectoryServices.ActiveDirectory
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public DomainControllerCollection FindAllDiscoverableDomainControllers(
	string siteName


Type: System.String
The name of the site to search for the domain controllers.

Return Value

Type: System.DirectoryServices.ActiveDirectory.DomainControllerCollection
A DomainControllerCollection that contains the domain controller objects that were found by this method.


The target server is either busy or unavailable.


siteName is an empty string.


siteName is null.


The object has been disposed.

You can find discoverable domain controllers by querying DNS SRV records. If a domain controller does not register an SRV record for the specified site, it will not be returned by this method, even if the domain controller is physically located within that site.

All domain controllers that register an SRV record for the specified site will be returned by this method, even if they are not physically located within that site.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.