Microsoft Operations Manager |
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)
Long. Returns -1 if an error occurred.
If an error occurs, information is returned using the built-in, error-handling mechanism provided by the scripting language.
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
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.