GlobalCatalog.FindAll Method (DirectoryContext, String)

 

Finds all global catalog servers in the specified context and site.

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

public static GlobalCatalogCollection FindAll(
	DirectoryContext context,
	string siteName
)

Parameters

context
Type: System.DirectoryServices.ActiveDirectory.DirectoryContext

An DirectoryContext object that contains the target and credentials to use for the search. The target of the context must be a forest.

siteName
Type: System.String

The name of the site to search for global catalog servers.

Return Value

Type: System.DirectoryServices.ActiveDirectory.GlobalCatalogCollection

A GlobalCatalogCollection object that contains the global catalog servers found by the search.

Exception Condition
ArgumentException

context or siteName is not valid.

ArgumentNullException

context or siteName is null.

.NET Framework
Available since 2.0
Return to top
Show: