Microsoft Operations Manager

LostAndFoundCount Property

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

Access

Read-only

Return Value

Long

Remarks

To bind to the lost and found container without updating the LostAndFoundCountproperty, use the BindObjectmethod instead of the BindLostFoundContainermethod.

Examples

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

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

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.