PowerShell Script to Retrieve the Laptop’s Battery Status

Use this PowerShell script to learn about a laptop's battery status.

Copy and paste from between the lines.

=============================

$computer = "LocalHost"
$namespace = "root\WMI"
Get-WmiObject -class BatteryStatus -computername $computer -namespace $namespace

=============================

Information retrieved:

Active
Caption
ChargeRate
Charging
Critical
Description
DischargeRate
Discharging
Frequency_Object
Frequency_PerfTime
Frequency_Sys100NS
InstanceName
Name
PowerOnline
RemainingCapacity
Tag
Timestamp_Object
Timestamp_PerfTime
Timestamp_Sys100NS
Voltage

Leave a Reply

Your email address will not be published. Required fields are marked *