how to get battery percentage using batch file 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"