Microsoft Operations Manager

GetDatabaseInfo Method

The GetDatabaseInfomethod retrieves the path and size of the Active Directory database. It also returns the amount of free space, in kilobytes, for the drive on which the database is located.

[VBScript]
ActiveDirectory.GetDatabaseInfo(Path Variant, Size Variant,
FreeSpace Variant)

Parameters

Path
[Out] Path of the Active Directory database.
Size
[Out] Size, in kilobytes, of the Active Directory database.
FreeSpace
[Out] Amount of free space, in kilobytes, on the drive on which the database is located.

Return Value

Long

Examples

The following example shows how to get information about the Active Directory database.

[VBScript] 
Function GetADFreeSpace()
	Dim objActiveDirectory
	Dim strPath
	Dim lngSize, lngFreeSpace

	lngFreeSpace = -1
	lngSize = -1
	strPath = ""

	Set objActiveDirectory =
CreateObject("McActiveDir.ActiveDirectory")

	objActiveDirectory.GetDatabaseInfo(strPath, lngSize,
lngFreeSpace)

	Set objActiveDirectory = Nothing

	GetADFreeSpace = lngFreeSpace
End Function

Requirements

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

See Also

ActiveDirectory Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.