The sample scripts are not supported under any N-able support program or service. The sample scripts are provided AS IS without warranty of any kind, and N-able expressly disclaims all implied warranties including, warranties of merchantability or of fitness for a particular purpose. In no event shall N-able or any other party be liable for damages arising out of the use of or inability to use the sample scripts.

Battery Capacity Monitoring RMM

Last Modified Date

6/22/2021 2:16 PM

Description

This script was taken from a Reddit Post and modified to work within RMM

The script gets battery information for all batteries (usually for most laptops there should be only one), and will compare the reported full charged capacity (in milli-watt-hours) and will compare it to the designed capacity. it will generate a percentage from it and will report on the ''health'' of the battery based on that.

If multiple batteries are found, it will show details for all of them but will only threshold on the worse one.

Type

Custom Service / Script Check

Category

Windows Devices

Target OS

Windows 8/8.1;Windows 10;Windows Server 2012 / 2012R2;Windows Server 2016;Windows Server 2019

Compatible with N-Central

No

N-Central minimum version

Compatible with RMM

Yes

Syntax

To use this, simply upload this to your script manager in RMM, and select "Script Check" as the option
Then add it as a check to a device, and as an input, you will get to customize the threshold if desired

Output

    
The Policy will output the following data points :

Policy Output Parameters:
     Battery Serial Number: bq20z45109PJ35CAV847DZACACDANA
     Calculated Battery Capacity Left %: 82
     Designed Capacity (milliwatt-hours): 73360
     Full Capacity (milliwatt-hours): 60440
     Number of Batteries Found on This System: 1
     Details About All Batteries Found: bq20z45109PJ35CAV847DZACACDANA , Capacity%: 82 , DesignedCapacity: 73360 , FullCharge: 60440

Keywords

Related Content