Finding Global Catalog servers in the forest
Global catalogs are domain controllers that also hold a subset of information on all objects in the forest. They are a required infrastructure component for Universal Groups and Exchange among other things.
select -ExpandProperty GlobalCatalogs |
$for = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
select Name, IPAddress |
Only two options for discovering them. The Microsoft cmdlets provide a Get-ADForest that returns an object representing the forest – it includes a collection of global catalog names
The Script uses System.DirectoryServices.ActiveDirectory.Forest and the GetCurrentForest() method to discover the forest object and the collection of global catalogs.
There doesn’t seem to be an easy way to do the job through the provider or the Quest cmdlets