Kaseya Community

OSX / Mac Need Procedure that reports battery percentage remaining for bluetooth keyboard and trackpad

I know this command on a mac terminal will report the bluetooth keyboard?

$ ioreg -c AppleBluetoothHIDKeyboard |grep '"BatteryPercent" ='

Is there a way I can get the batterypercent to be emailed to me or updated in the audit for the machine?

Comments
  • OSX / Mac Need Procedure that reports battery percentage remaining for bluetooth keyboard and trackpad

    I tried that on latest Mac OSX (El Capitan) and didn't work. Try

    ioreg -n "BNBMouseDevice" | grep -i '"BatteryPercent" ='|sed 's/[^[:digit:]]//g'

    This gives you just the digits