Contact Info

Crumbtrail » Administration » Scripts » WMI Performance Counters » VBScript

IIsWebService - 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 IIsWebService WMI class can be used in ActiveXperts Network Monitor to monitor your servers.



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

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

For Each objItem in colItems
	WScript.Echo "AcceptPause:" & objItem.AcceptPause
	WScript.Echo "AcceptStop:" & objItem.AcceptStop
	WScript.Echo "AppIsolated:" & objItem.AppIsolated
	WScript.Echo "AppPackageID:" & objItem.AppPackageID
	WScript.Echo "AppPackageName:" & objItem.AppPackageName
	WScript.Echo "AppRoot:" & objItem.AppRoot
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "CheckPoint:" & objItem.CheckPoint
	WScript.Echo "CreationClassName:" & objItem.CreationClassName
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "DesktopInteract:" & objItem.DesktopInteract
	WScript.Echo "DisplayName:" & objItem.DisplayName
	WScript.Echo "ErrorControl:" & objItem.ErrorControl
	WScript.Echo "ExitCode:" & objItem.ExitCode
	WScript.Echo "InstallDate:" & objItem.InstallDate
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "PathName:" & objItem.PathName
	WScript.Echo "ProcessId:" & objItem.ProcessId
	WScript.Echo "ServiceSpecificExitCode:" & objItem.ServiceSpecificExitCode
	WScript.Echo "ServiceType:" & objItem.ServiceType
	WScript.Echo "SSLCertHash:" & Join(objItem.SSLCertHash)
	WScript.Echo "Started:" & objItem.Started
	WScript.Echo "StartMode:" & objItem.StartMode
	WScript.Echo "StartName:" & objItem.StartName
	WScript.Echo "State:" & objItem.State
	WScript.Echo "Status:" & objItem.Status
	WScript.Echo "SystemCreationClassName:" & objItem.SystemCreationClassName
	WScript.Echo "SystemName:" & objItem.SystemName
	WScript.Echo "TagId:" & objItem.TagId
	WScript.Echo "WaitHint:" & objItem.WaitHint
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""