Contact Info

Crumbtrail » Administration » Scripts » WMI » powershell sample

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


The Win32_UninterruptiblePowerSupply WMI class represents the capabilities and management capacity of an uninterruptible power supply (UPS). The properties of the UPS device indicate when incoming power is trimmed or boosted, and the aggregated information of the batteries, generators, and so on, that comprise the device. These individual components (for example, multiple batteries) can also be independently modeled and associated with the UPS.

Sample Code

$computer = "LocalHost" 
$namespace = "root\CIMV2" 
Get-WmiObject -class Win32_UninterruptiblePowerSupply -computername $computer -namespace $namespace