Microsoft Operations Manager

SearchGlobalCatalog Method

The SearchGlobalCatalogmethod performs the global catalog query specified by the Queryparameter and returns the number of objects that match the query.

[VBScript]
ActiveDirectory.SearchGlobalCatalog(Query String)

Parameters

Query
Specifies the query to perform in the form of an LDAP query.

Return Value

Long. Returns -1 if an error occurred.

Remarks

If an error occurs, information is returned using the built-in, error-handling mechanism provided by the scripting language.

Examples

The following example shows how to determine the time required to search the global catalog.

[VBScript] 
Dim objActiveDirectory
Dim lngObjectCount, lngSearchTimeSet 

Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")

lngObjectCount =
objActiveDirectory.SearchGlobalCatalog("(objectCategory=person)")

If (lngObjectCount >= 0) Then
	lngSearchTime = objActiveDirectory.GlobalCatalogSearchTime
End If

Set objActiveDirectory = Nothing

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.