Domain.FindAllDomainControllers Method (String)

 

Finds all of the 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 FindAllDomainControllers(
	string siteName
)

Parameters

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.

Exception Condition
ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ArgumentException

siteName is an empty string.

ArgumentNullException

siteName is null.

ObjectDisposedException

The object has been disposed.

.NET Framework
Available since 2.0
Return to top
Show: