Microsoft Operations Manager |
The LostAndFoundCountproperty gets the number of Active Directory objects in the lost and found container. To determine the lost and found count, you must first bind to the lost and found container using the BindLostFoundContainermethod.
[VBScript]
ActiveDirectory.LostAndFoundCount
Read-only
Long
To bind to the lost and found container without updating the LostAndFoundCountproperty, use the BindObjectmethod instead of the BindLostFoundContainermethod.
The following example shows how to determine the number of objects in the lost and found container.
[VBScript]
Function GetLostItemsCount()
Dim objActiveDirectory
Dim lngCount
lngCount = -1
Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")
If (objActiveDirectory.BindLostFoundContainer()) Then
lngCount = objActiveDirectory.LostAndFoundCount
End If
Set objActiveDirectory = Nothing
GetLostItemsCount = lngCount
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
ActiveDirectory Object, ActiveDirectory.BindLostFoundContainer Method, ActiveDirectory.BindObject Method
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.