Contact Info

Crumbtrail » Administration » Scripts » WMI Performance Counters » VBScript

OSRecoveryConfiguration - WMI sample in VBScript

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The OSRecoveryConfiguration WMI class can be used in ActiveXperts Network Monitor to monitor your servers.



Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_OSRecoveryConfiguration")

For Each objItem in colItems
	WScript.Echo "AutoReboot:" & objItem.AutoReboot
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "DebugFilePath:" & objItem.DebugFilePath
	WScript.Echo "DebugInfoType:" & objItem.DebugInfoType
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "ExpandedDebugFilePath:" & objItem.ExpandedDebugFilePath
	WScript.Echo "ExpandedMiniDumpDirectory:" & objItem.ExpandedMiniDumpDirectory
	WScript.Echo "KernelDumpOnly:" & objItem.KernelDumpOnly
	WScript.Echo "MiniDumpDirectory:" & objItem.MiniDumpDirectory
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "OverwriteExistingDebugFile:" & objItem.OverwriteExistingDebugFile
	WScript.Echo "SendAdminAlert:" & objItem.SendAdminAlert
	WScript.Echo "SettingID:" & objItem.SettingID
	WScript.Echo "WriteDebugInfo:" & objItem.WriteDebugInfo
	WScript.Echo "WriteToSystemLog:" & objItem.WriteToSystemLog
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""