Skip to content

Custom Commands for Mosyle

Hat Tip to another Adam. I recently discovered these when poking around in Adam Codega’s Github. There’s a couple especially I want to draw attention to.

BatteryHealthCA.sh

This little script will get the battery service level, plus tell you the number of power cycles the battery has had. It will appear as something like “Normal (256)”. Battery condition is normal and has had 256 cycles.

From there in Mosyle, you can create a Smart Device Group where the criteria is for that field is like “Service Recommended” as you can see below.

Here’s the direct link.

KernelPanicCA.sh

This script will tell you how many kernel panics a device has had over the past seven days. Allowing you to investigate further.

Once again you make a smart group in Mosyle where the value of that field is greater than 0 and then investigate it.

Here’s the direct link.

I’ve thanked Adam many times in Slack, so now I’ll thank him publicly on here and hopefully other people will find these scripts handy.

Leave a Reply