Get the charge status in % of a battery.
Solution:
# Get battery info
$BatteryReport = [Windows.Devices.Power.Battery]::AggregateBattery.GetReport()
# Get battery full charge capacity in mWh
$BatteryMaxCapacity = [convert]::ToDouble($BatteryReport.FullChargeCapacityInMilliwattHours)
# Get battery remaining capacity in mWh
$BatteryRemainingCapacity = [convert]::ToDouble($BatteryReport.RemainingCapacityInMilliwattHours)
# Calculate the percentage of the battery charge
$BatteryCharged = [int][math]::Round(($BatteryRemainingCapacity / $BatteryMaxCapacity) *100)