Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Check Battery Charge Status on Windows Using CMD and PowerShell

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:

Checking Battery Status Using CMD

  1. Open Command Prompt:

    • Press Win + R, type cmd, and hit Enter.
  2. Run the Battery Report Command:

    • Type the following command and press Enter:
      powercfg /batteryreport /output "C:\battery_report.html"
    • This command generates a detailed battery report and saves it as an HTML file at the specified location (C:\battery_report.html).
  3. View the Report:

    • Navigate to the specified location and open the battery_report.html file in a web browser to view detailed information about your battery's health, charge status, and usage history.

Checking Battery Status Using PowerShell

  1. Open PowerShell:

    • Press Win + X, then select Windows PowerShell (Admin).
  2. Run the Battery Report Command:

    • Type the following command and press Enter:
      powercfg /batteryreport /output "C:\battery_report.html"
    • Similar to CMD, this command generates a battery report and saves it as an HTML file.
  3. View the Report:

    • Open the battery_report.html file from the specified location in a web browser to see the detailed battery information.

Real-Time Battery Status Using PowerShell

For real-time battery status, you can use the Get-WmiObject cmdlet in PowerShell:

  1. Open PowerShell:

    • Press Win + X, then select Windows PowerShell (Admin).
  2. Run the Real-Time Status Command:

    • Type the following command and press Enter:
      Get-WmiObject -Class Win32_Battery
    • This command retrieves real-time information about the battery, including its current charge status, estimated run time, and more.
  3. Interpret the Output:

    • The output will display various properties of the battery. Look for BatteryStatus, EstimatedChargeRemaining, and EstimatedRunTime for real-time charge status and other details.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.