Contact Info

Crumbtrail » Administration » Scripts » WMI Performance Counters » VBScript

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



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

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

For Each objItem in colItems
	WScript.Echo "AutoStart:" & objItem.AutoStart
	WScript.Echo "Cpu:" & objItem.Cpu
	WScript.Echo "Enable32BitAppOnWin64:" & objItem.Enable32BitAppOnWin64
	WScript.Echo "Failure:" & objItem.Failure
	WScript.Echo "ManagedPipelineMode:" & objItem.ManagedPipelineMode
	WScript.Echo "ManagedRuntimeVersion:" & objItem.ManagedRuntimeVersion
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "PassAnonymousToken:" & objItem.PassAnonymousToken
	WScript.Echo "ProcessModel:" & objItem.ProcessModel
	WScript.Echo "QueueLength:" & objItem.QueueLength
	WScript.Echo "Recycling:" & objItem.Recycling
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""