Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » vbscript sample

Win32_PerfRawData_IMMcuPerf vbscript sample code

The foundations for Manageability in Windows is 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. The Win32_PerfRawData_IMMcuPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

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

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

For Each objItem in colItems
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "Frequency_Object:" & objItem.Frequency_Object
	WScript.Echo "Frequency_PerfTime:" & objItem.Frequency_PerfTime
	WScript.Echo "Frequency_Sys100NS:" & objItem.Frequency_Sys100NS
	WScript.Echo "IMMCU000ActiveConferences:" & objItem.IMMCU000ActiveConferences
	WScript.Echo "IMMCU001ConnectedUsers:" & objItem.IMMCU001ConnectedUsers
	WScript.Echo "IMMCU002ConnectedDialinUsers:" & objItem.IMMCU002ConnectedDialinUsers
	WScript.Echo "IMMCU003ConnectedDialoutUsers:" & objItem.IMMCU003ConnectedDialoutUsers
	WScript.Echo "IMMCU004IncomingMessages:" & objItem.IMMCU004IncomingMessages
	WScript.Echo "IMMCU005IncomingMessagespersec:" & objItem.IMMCU005IncomingMessagespersec
	WScript.Echo "IMMCU006OutgoingMessages:" & objItem.IMMCU006OutgoingMessages
	WScript.Echo "IMMCU007OutgoingMessagespersec:" & objItem.IMMCU007OutgoingMessagespersec
	WScript.Echo "IMMCU008AverageMessageSize:" & objItem.IMMCU008AverageMessageSize
	WScript.Echo "IMMCU008AverageMessageSize_Base:" & objItem.IMMCU008AverageMessageSize_Base
	WScript.Echo "IMMCU010MessageForwardErrors:" & objItem.IMMCU010MessageForwardErrors
	WScript.Echo "IMMCU011MessageForwardErrorspersec:" & objItem.IMMCU011MessageForwardErrorspersec
	WScript.Echo "IMMCU012IncomingInfos:" & objItem.IMMCU012IncomingInfos
	WScript.Echo "IMMCU013IncomingInfospersec:" & objItem.IMMCU013IncomingInfospersec
	WScript.Echo "IMMCU014OutgoingInfos:" & objItem.IMMCU014OutgoingInfos
	WScript.Echo "IMMCU015OutgoingInfospersec:" & objItem.IMMCU015OutgoingInfospersec
	WScript.Echo "IMMCU016AverageInfoSize:" & objItem.IMMCU016AverageInfoSize
	WScript.Echo "IMMCU016AverageInfoSize_Base:" & objItem.IMMCU016AverageInfoSize_Base
	WScript.Echo "IMMCU018InfoForwardErrors:" & objItem.IMMCU018InfoForwardErrors
	WScript.Echo "IMMCU019InfoForwardErrorspersec:" & objItem.IMMCU019InfoForwardErrorspersec
	WScript.Echo "IMMCU020ThrottledSipConnections:" & objItem.IMMCU020ThrottledSipConnections
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "Timestamp_Object:" & objItem.Timestamp_Object
	WScript.Echo "Timestamp_PerfTime:" & objItem.Timestamp_PerfTime
	WScript.Echo "Timestamp_Sys100NS:" & objItem.Timestamp_Sys100NS
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""
Next