Closed forderud closed 11 months ago
WMI classes:
Query battery status:
Get-CimInstance -Namespace root\CIMV2 Win32_Battery
Sample output:
PS > Get-CimInstance -Namespace root\CIMV2 Win32_Battery Caption : Internal Battery Description : Internal Battery InstallDate : Name : SimulatedBattery Status : Service Availability : 1 ConfigManagerErrorCode : ConfigManagerUserConfig : CreationClassName : Win32_Battery DeviceID : SimulatedBattery0000 ErrorCleared : ErrorDescription : LastErrorCode : PNPDeviceID : PowerManagementCapabilities : {1} PowerManagementSupported : False StatusInfo : SystemCreationClassName : Win32_ComputerSystem SystemName : WINDEV2211EVAL BatteryStatus : 6 Chemistry : 2 DesignCapacity : DesignVoltage : EstimatedChargeRemaining : 90 EstimatedRunTime : 0 ExpectedLife : FullChargeCapacity : MaxRechargeTime : SmartBatteryVersion : TimeOnBattery : TimeToFullCharge : BatteryRechargeTime : ExpectedBatteryLife : PSComputerName : Caption : Internal Battery Description : Internal Battery InstallDate : Name : SimulatedBattery Status : OK Availability : 2 ConfigManagerErrorCode : ConfigManagerUserConfig : CreationClassName : Win32_Battery DeviceID : SimulatedBattery0000 ErrorCleared : ErrorDescription : LastErrorCode : PNPDeviceID : PowerManagementCapabilities : {1} PowerManagementSupported : False StatusInfo : SystemCreationClassName : Win32_ComputerSystem SystemName : WINDEV2211EVAL BatteryStatus : 2 Chemistry : 2 DesignCapacity : DesignVoltage : EstimatedChargeRemaining : 100 EstimatedRunTime : 0 ExpectedLife : FullChargeCapacity : MaxRechargeTime : SmartBatteryVersion : TimeOnBattery : TimeToFullCharge : BatteryRechargeTime : ExpectedBatteryLife : PSComputerName :
Closing issue, since WMI access works out-of-the-box with no effort from the driver.
WMI classes:
Query battery status:
Get-CimInstance -Namespace root\CIMV2 Win32_Battery
Sample output: