Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Monitoring the battery charge status is crucial for maintaining the health and longevity of your laptop or any other battery-powered Windows device. While Windows provides a graphical interface to check the battery status, knowing how to retrieve this information via command-line tools like CMD and PowerShell can be particularly useful for automation, remote management, and scripting purposes.
In this article, we will explore how to check the battery charge status on a Windows system using both CMD (Command Prompt) and PowerShell. This will empower you to create scripts for battery monitoring and management.
Examples:
Open Command Prompt:
Win + R
, type cmd
, and hit Enter.Run the Battery Report Command:
powercfg /batteryreport /output "C:\battery_report.html"
View the Report:
battery_report.html
file in a web browser to view detailed information about your battery's health, charge status, and usage history.Open PowerShell:
Win + X
, then select Windows PowerShell (Admin)
.Run the Battery Report Command:
powercfg /batteryreport /output "C:\battery_report.html"
View the Report:
battery_report.html
file from the specified location in a web browser to see the detailed battery information.For real-time battery status, you can use the Get-WmiObject
cmdlet in PowerShell:
Open PowerShell:
Win + X
, then select Windows PowerShell (Admin)
.Run the Real-Time Status Command:
Get-WmiObject -Class Win32_Battery
Interpret the Output:
BatteryStatus
, EstimatedChargeRemaining
, and EstimatedRunTime
for real-time charge status and other details.