Collect battery health diagnostics and performance data on Windows laptops
This Automox Worklet™ queries the Win32_Battery WMI class to collect comprehensive battery health information from Windows laptop and mobile endpoint endpoints. The Worklet extracts critical properties including design capacity, full charge capacity, battery health percentage, charge remaining, estimated runtime, and cycle count.
The Worklet generates a detailed diagnostic report showing battery chemistry type (lithium-ion, lithium-polymer, etc.), availability status, charging state, and design voltage. If multiple batteries are detected on the endpoint, individual numbered reports appear in the Automox Activity Log for each one.
The health percentage is calculated by dividing the full charge capacity by the design capacity, giving you a precise measure of battery degradation over time. Unknown values gracefully return as "Unknown" if the BIOS or firmware cannot provide the data.
Users report that their laptops die unexpectedly during meetings or lose charge rapidly, but you have no data to identify which batteries are failing. Without battery health metrics, you cannot distinguish between user complaints and actual hardware degradation. Laptop batteries degrade predictably over time and charge cycles. Without visibility into battery health, you risk unexpected endpoint shutdowns during critical work, user frustration, and costly emergency endpoint replacements. Proactive battery monitoring allows you to plan replacements before batteries fail.
Battery health data also helps you identify defective hardware during manufacturer warranty periods. If a battery shows excessive capacity loss shortly after purchase, you can claim warranty service before the window closes. Also, tracking charge cycle counts helps right-size new endpoint purchases based on actual usage patterns across your fleet.
Evaluation phase: The Worklet checks the endpoint endpoint type using WMI. If the endpoint is not classified as a laptop or mobile endpoint (PCSystemType value of 2), the Worklet exits without proceeding. This prevents unnecessary collection on desktop systems.
Remediation phase: The Worklet queries Win32_Battery instances and extracts 15 different battery properties into a structured report. For each battery found, the Worklet calculates health percentage and translates cryptic integer values (battery status codes, chemistry types, availability states) into human-readable descriptions, then writes the complete diagnostic report to the Automox Activity Log.
Windows operating system: Windows 7, Windows 8, Windows 10, Windows 11, or Windows Server 2016 and later
endpoint type: Laptops or mobile endpoints (desktops will skip the Worklet)
PowerShell 3.0 or later
Battery hardware must be present and recognized by Windows (some endpoints may require BIOS or firmware updates to expose all battery properties)
WMI access and Win32_ComputerSystem class availability
FixNow compatible (RunNow feature supported)
After the Worklet runs on a compatible laptop, your endpoint will have comprehensive battery health data logged to the Activity Log. The Automox Activity Log displays a detailed battery report with sections for battery details, health metrics, and specifications. The report includes the battery health percentage (calculated as full charge capacity divided by design capacity), current charge remaining percentage, estimated runtime, and charge cycle count.
Battery status values show the current charging state (discharging, charging, fully charged, low, or critical). Chemistry type identifies the battery technology (lithium-ion, lithium-polymer, nickel-metal hydride, etc.). If your endpoint has multiple batteries, the log shows a numbered report for each one. Unknown values indicate missing BIOS data and typically require a firmware update to expose those properties.
Run this Worklet on a pilot Windows endpoint and review evaluation output for check battery health.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as Get-CimInstance, Write-Output.
Validate remediation effects from script operations such as Get-PropValue, Get-BatteryStatus, Write-Output, then rerun evaluation for compliance.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy