macOS Scripts

Execute more sophisticated scripts on macOS devices using SOTI MobiControl custom scripts.

Send scripts to devices using the method described in Sending Scripts to Devices. Create a custom script and copy it into the Script Editor.

A Send Script window with Create New Script highlighted.
Important: Indicate the script language in the first line of the script code.

Shell

A shell script example.

shell
a=20
b=10

if [ $a -gt $b ]
then
   echo "a is equal to b"
   mkdir /Users/a1/Desktop/script/shell1
else
   echo "a is not equal to b"
  mkdir /Users/a1/Desktop/script/shell
fi