Microsoft Operations Manager |
The LastErrorproperty gets the last error encountered by the object.
[VBScript] ActiveDirectory.LastError
Read-only
String
Beginning in MOM SP1, you should use the error handling provided by the programming language instead of the LastErrorproperty.
The following example shows how to retrieve an error from the last operation.
[VBScript]
Function GetADErrorDescription()
Dim objActiveDirectory
Dim strError
strError = ""
Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")
If Not(objActiveDirectory.BindPDCMaster()) Then
strError = objActiveDirectory.LastError
End If
Set objActiveDirectory = Nothing
GetADErrorDescription = strError
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.