Posted: . At: 10:05 AM. This was 9 years ago. Post ID: 8224
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Check the status of your laptop battery with Powershell on Windows.

This simple one liner will print the battery status of your laptop battery in percent. This shows that I have 48% battery charge remaining.

PS C:\> (Get-WmiObject -Class Win32_Battery).estimatedchargeremaining
48

Run it like this to get all of the information about your laptop battery.

PS C:\WINDOWS\system32> (Get-WmiObject -Class Win32_Battery)
 
 
__GENUS                     : 2
__CLASS                     : Win32_Battery
__SUPERCLASS                : CIM_Battery
__DYNASTY                   : CIM_ManagedSystemElement
__RELPATH                   : Win32_Battery.DeviceID="0727SDIDELL G019Y332"
__PROPERTY_COUNT            : 33
__DERIVATION                : {CIM_Battery, CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER                    : BLUFOR
__NAMESPACE                 : root\cimv2
__PATH                      : \\BLUFOR\root\cimv2:Win32_Battery.DeviceID="0727SDIDELL G019Y332"
Availability                : 2
BatteryRechargeTime         : 
BatteryStatus               : 2
Caption                     : Internal Battery
Chemistry                   : 2
ConfigManagerErrorCode      : 
ConfigManagerUserConfig     : 
CreationClassName           : Win32_Battery
Description                 : Internal Battery
DesignCapacity              : 
DesignVoltage               : 12198
DeviceID                    : 0727SDIDELL G019Y332
ErrorCleared                : 
ErrorDescription            : 
EstimatedChargeRemaining    : 52
EstimatedRunTime            : 71582788
ExpectedBatteryLife         : 
ExpectedLife                : 
FullChargeCapacity          : 
InstallDate                 : 
LastErrorCode               : 
MaxRechargeTime             : 
Name                        : DELL G019Y332
PNPDeviceID                 : 
PowerManagementCapabilities : {1}
PowerManagementSupported    : False
SmartBatteryVersion         : 
Status                      : OK
StatusInfo                  : 
SystemCreationClassName     : Win32_ComputerSystem
SystemName                  : BLUFOR
TimeOnBattery               : 
TimeToFullCharge            : 
PSComputerName              : BLUFOR

This is a great way to get information about your laptop battery in Windows.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.