FindAllDiscoverableGlobalCatalogs Method (String)

Forest.FindAllDiscoverableGlobalCatalogs Method (String)

 

Finds all of the discoverable global catalogs in this forest in a specified site.

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

public GlobalCatalogCollection FindAllDiscoverableGlobalCatalogs(
	string siteName
)

Parameters

siteName
Type: System.String

The name of the site to search.

Return Value

Type: System.DirectoryServices.ActiveDirectory.GlobalCatalogCollection

A GlobalCatalogCollection that contains the collection of global catalogs that were found.

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.

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

All global catalogs which register a GC SRV record for the specified site will be returned by this method, even if they might not be physically located within that site.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft