yesterday
In 11.11 a new attribute for macOS was released - Battery Health. However the only value I see reported for any of my computers over 14.4 is Unknown. Is anyone seeing this work? There is a note stating that this will work for iOS but not iPadOS - but nothing about it not working for macOS.
Solved! Go to Solution.
yesterday
This appears to be a Known Issue
PI122901 | Eligible computers and mobile devices may incorrectly display "Unknown" as a Battery Health status. |
yesterday
i'm experiencing the same issue; all our Mac Devices are displaying as unknown in the results.
yesterday
This appears to be a Known Issue
PI122901 | Eligible computers and mobile devices may incorrectly display "Unknown" as a Battery Health status. |
yesterday
Try this extension attribute as a work around:
Battery Health Status
#!/bin/sh
result=`ioreg -r -c "AppleSmartBattery" | grep "PermanentFailureStatus" | awk '{print $3}' | sed s/\"//g`
if [ "$result" == "1" ]; then
result="Failure"
elif [ "$result" == "0" ]; then
result="OK"
fi
echo "<result>$result</result>"
54m ago
this is another script that you could use as well:
#!/bin/sh
#Determine model
arch=$(/usr/bin/arch)
model=`system_profiler SPHardwareDataType | grep "Model Name:" | cut -d ' ' -f 9`
if [[ ! "$model" =~ "Book" ]]; then
echo "<result>Not A Laptop</result>"
return 0
fi
if [ "$arch" == "arm64" ]; then
capacity=$(system_profiler SPPowerDataType | grep "Maximum Capacity:" | sed 's/.*Maximum Capacity: //')
echo "<result>$(system_profiler SPPowerDataType | grep "Condition:" | sed 's/.*Condition: //') with $capacity capacity</result>"
elif [ "$arch" == "i386" ]; then
echo "<result>$(system_profiler SPPowerDataType | grep "Condition:" | sed 's/.*Condition: //')</result>"
else
echo "<result>Unknown Architecture</result>"
fi