Check Laptop Battery Charge and Status from the Command Line
Read the current battery percentage, charging status and estimated remaining runtime in PowerShell with Win32_Battery.
01Command
$ Get-CimInstance Win32_Battery | Select-Object EstimatedChargeRemaining, BatteryStatus, EstimatedRunTime02What it does
The battery flyout in the taskbar is fine for a glance, but scripts and remote sessions need the numbers programmatically. Win32_Battery reports EstimatedChargeRemaining as a percentage, a BatteryStatus code (2 means on AC power, 1 means discharging), and EstimatedRunTime in seconds of remaining life at the current drain. It works on laptops and tablets; desktops simply return nothing.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-CimInstance cmdlet | Microsoft LearnEvidence: Get-CimInstance queries WMI classes such as Win32_Battery by -ClassName.
- Win32_Battery class | Microsoft LearnEvidence: Win32_Battery exposes EstimatedChargeRemaining (percent), BatteryStatus and EstimatedRunTime (seconds).
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Create an HTML report showing design vs. full-charge capacity and recent battery drain.
Activate High Performance, Balanced, or any custom power scheme instantly by GUID — perfect for scripts that toggle between battery-friendly and full-throttle modes.
60-second trace that reports devices, timeouts and settings preventing sleep or wasting power.