windows batch file access battery percentage code example
Example: how to get battery percentage using batch file
# Type this command in cmd or powershell
powershell -command "(Get-WmiObject Win32_Battery).EstimatedChargeRemaining"
# Type this command in cmd or powershell
powershell -command "(Get-WmiObject Win32_Battery).EstimatedChargeRemaining"