Microsoft Operations Manager |
The NextGlobalCatalogmethod gets the next global catalog in the forest.
[VBScript]
ActiveDirectory.NextGlobalCatalog()
None
String
The following example shows how to enumerate the global catalogs in the forest.
[VBScript]
Function GetCatalogs()
Dim objActiveDirectory
Dim strGlobalCatalog
Dim intIndex
Dim arrCatalogs()
intIndex = 0
Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")
If (objActiveDirectory.RefreshGlobalCatalogs()) Then
strGlobalCatalog = objActiveDirectory.NextGlobalCatalog()
While NOT(strGlobalCatalog = "")
ReDim Preserve arrCatalogs(intIndex)
arrCatalogs(intIndex) = strGlobalCatalog
intIndex = intIndex + 1
strGlobalCatalog =
objActiveDirectory.NextGlobalCatalog()
Wend
End If
Set objActiveDirectory = Nothing
GetCatalogs = arrCatalogs
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.