Battery Life Script:
Locations:
Compiled: \\nas01\itcr_dept\CSDS\CSDS General\Scripts\Ad Hoc\PS GetComputerInfo\
C:\CSDS\Scripts\
This procedure can be run remotely for Laptops from your Office computer. (Desktops will show 0% battery life)
- Run Powershell as Admin (Dadmin)
- Copy and paste the Script below and run it by hitting the "run" or the Green play button at the top. (leave all quotes)
$Computer = “csds-XXXXX” #Replace with actual machine name
function Get-BatteryHealth {
$FCC = Get-WMIObject -cn $Computer -Namespace root\wmi -Class BatteryFullChargedCapacity | select FullChargedCapacity
$DC = Get-WMIObject -cn $Computer -Namespace root\wmi -Class BatteryStaticData | select DesignedCapacity
$batteryresult = ($FCC.FullChargedCapacity / $DC.DesignedCapacity) * 100
$batteryresult = [math]::Round($batteryresult)
"Battery running at $batteryresult% of original manufactured state"}
Get-BatteryHealth -cn $Computer
3. You will get the output of the Battery Life at the bottom of the stating "Battery running at XX% of the original Manufactured State."
Notes:
We typically see a degradation in user’s batteries below 65%; anything under 40% is very noticeable. If we notice a battery below 40% advise the user they may want to get a new one purchased through their department. If the user is constantly on a docking station they will not notice the battery degradation and will not need a new battery since their power comes from the dock.
**The battery purchase can be advised to employees that travel or have their laptop off the dock constantly**