Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI Performance Counters » VBScript

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


Processor

Example(s)

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

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

For Each objItem in colItems
	WScript.Echo "AddressWidth:" & objItem.AddressWidth
	WScript.Echo "Architecture:" & objItem.Architecture
	WScript.Echo "Availability:" & objItem.Availability
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "ConfigManagerErrorCode:" & objItem.ConfigManagerErrorCode
	WScript.Echo "ConfigManagerUserConfig:" & objItem.ConfigManagerUserConfig
	WScript.Echo "CpuStatus:" & objItem.CpuStatus
	WScript.Echo "CreationClassName:" & objItem.CreationClassName
	WScript.Echo "CurrentClockSpeed:" & objItem.CurrentClockSpeed
	WScript.Echo "CurrentVoltage:" & objItem.CurrentVoltage
	WScript.Echo "DataWidth:" & objItem.DataWidth
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "DeviceID:" & objItem.DeviceID
	WScript.Echo "ErrorCleared:" & objItem.ErrorCleared
	WScript.Echo "ErrorDescription:" & objItem.ErrorDescription
	WScript.Echo "ExtClock:" & objItem.ExtClock
	WScript.Echo "Family:" & objItem.Family
	WScript.Echo "InstallDate:" & objItem.InstallDate
	WScript.Echo "L2CacheSize:" & objItem.L2CacheSize
	WScript.Echo "L2CacheSpeed:" & objItem.L2CacheSpeed
	WScript.Echo "L3CacheSize:" & objItem.L3CacheSize
	WScript.Echo "L3CacheSpeed:" & objItem.L3CacheSpeed
	WScript.Echo "LastErrorCode:" & objItem.LastErrorCode
	WScript.Echo "Level:" & objItem.Level
	WScript.Echo "LoadPercentage:" & objItem.LoadPercentage
	WScript.Echo "Manufacturer:" & objItem.Manufacturer
	WScript.Echo "MaxClockSpeed:" & objItem.MaxClockSpeed
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "NumberOfCores:" & objItem.NumberOfCores
	WScript.Echo "NumberOfLogicalProcessors:" & objItem.NumberOfLogicalProcessors
	WScript.Echo "OtherFamilyDescription:" & objItem.OtherFamilyDescription
	WScript.Echo "PNPDeviceID:" & objItem.PNPDeviceID
	WScript.Echo "PowerManagementCapabilities:" & objItem.PowerManagementCapabilities
	WScript.Echo "PowerManagementSupported:" & objItem.PowerManagementSupported
	WScript.Echo "ProcessorId:" & objItem.ProcessorId
	WScript.Echo "ProcessorType:" & objItem.ProcessorType
	WScript.Echo "Revision:" & objItem.Revision
	WScript.Echo "Role:" & objItem.Role
	WScript.Echo "SecondLevelAddressTranslationExtensions:" & objItem.SecondLevelAddressTranslationExtensions
	WScript.Echo "SocketDesignation:" & objItem.SocketDesignation
	WScript.Echo "Status:" & objItem.Status
	WScript.Echo "StatusInfo:" & objItem.StatusInfo
	WScript.Echo "Stepping:" & objItem.Stepping
	WScript.Echo "SystemCreationClassName:" & objItem.SystemCreationClassName
	WScript.Echo "SystemName:" & objItem.SystemName
	WScript.Echo "UniqueId:" & objItem.UniqueId
	WScript.Echo "UpgradeMethod:" & objItem.UpgradeMethod
	WScript.Echo "Version:" & objItem.Version
	WScript.Echo "VirtualizationFirmwareEnabled:" & objItem.VirtualizationFirmwareEnabled
	WScript.Echo "VMMonitorModeExtensions:" & objItem.VMMonitorModeExtensions
	WScript.Echo "VoltageCaps:" & objItem.VoltageCaps
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""
Next