PowerTip: Use PowerShell to Show Remaining Battery Time

Doctor Scripto

Summary: Use Windows PowerShell to show the percentage of remaining battery time.

Hey, Scripting Guy! Question How can I use Windows PowerShell to show the percentage of remaining battery time on my laptop or on my Windows Surface?

Hey, Scripting Guy! Answer Use the Get-WmiObject cmdlet and query the Win32_Battery WMI class:

(Get-WmiObject win32_battery).estimatedChargeRemaining

0 comments

Discussion is closed.

Feedback usabilla icon