forderud / BatterySimulator

Driver to simulate multi-battery setups and test Windows power management
MIT License
14 stars 1 forks source link

WMI support #3

Closed forderud closed 11 months ago

forderud commented 12 months ago

WMI classes:

Query battery status:

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              :
forderud commented 11 months ago

Closing issue, since WMI access works out-of-the-box with no effort from the driver.