Mobile Battery Status Monitor

Version 2

    This is a SAM template that checks the remaining capacity of a device running Windows 7 or newer. It requires Powershell 2.0 or newer to work.

     

    The need to monitor a mobile device running the Windows OS, with a battery, are numerous. But a primary example is that you might have battery powered point-of-sale devices that you need to know if it is running low on battery or not. This is a monitor that can help with that data. A benefit of this monitor is that when you use the monitor's historical data and run reports for events or alerts, this could help you determine if a battery needs to be replaced in the device due to age or capacity.

     

    The Powershell script in the monitor itself is very simple (see reference link below for source):

     

    $stat = (Get-WmiObject win32_battery).estimatedChargeRemaining

    Write-Host 'Statistic: ' $stat

     

     

    The thresholds are configurable but here are the defaults:

    Warning = Less Than or Equal to 30 for a Single Poll

    Critical = Less Than or Equal to 15 for a Single Poll

     

     

    Reference:

    PowerTip: Use PowerShell to Show Remaining Battery Time - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs