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

Posted: June 2, 2015. At: 10:05 AM. This was 2 years ago. Post ID: 8224
Page permalink: http://securitronlinux.com/bejiitaswrath/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.

No comments have been made. Use this form to start the conversation :)

Leave a Reply