Microsoft Operations Manager

NextGlobalCatalog Method

The NextGlobalCatalogmethod gets the next global catalog in the forest.

[VBScript]
ActiveDirectory.NextGlobalCatalog()

Parameters

None

Return Value

String

Examples

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

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

ActiveDirectory Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.