Microsoft Operations Manager |
The BindCountproperty gets a running count of the bind operations performed.
[VBScript] ActiveDirectory.BindCount
Read-only
Long
The following example performs a bind operation and determines the average bind time to Active Directory.
[VBScript]
Function GetAverageTimeToBindToPDC(strDomain)
Dim objActiveDirectory
Dim lngBindTotal, lngBindCount, fAverageBindTime
fAverageBindTime = -1
Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")
objActiveDirectory.Domain = strDomain
If (objActiveDirectory.BindPDCMaster()) Then
lngBindTotal = objActiveDirectory.BindTotal
lngBindCount = objActiveDirectory.BindCount
If (lngBindCount > 0) Then
fAverageBindTime = lngBindTotal / lngBindCount
End If
End If
Set objActiveDirectory = Nothing
GetAverageTimeToBindToPDC = fAverageBindTime
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.