Forest.FindAllDiscoverableGlobalCatalogs Method

Finds all of the discoverable global catalogs in this forest.

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

member FindAllDiscoverableGlobalCatalogs : unit -> GlobalCatalogCollection

Return Value

Type: System.DirectoryServices.ActiveDirectory.GlobalCatalogCollection
A GlobalCatalogCollection that contains the collection of global catalogs that were found.

ExceptionCondition
ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ObjectDisposedException

The object has been disposed.

You can find discoverable domain controllers by querying DNS SRV records. Only global catalogs that register a generic, non-site-specific, GC SRV record are returned by this method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft