Run Scripts to apply configurations 05

Running scripts is another way you can install applications and software. You can also run scripts when you want to apply configurations or copy files from remote locations such as network shares. However, running scripts can be a complicated process and there can be a lot of challenges when trying to complete this properly.

Here are some tips to ensure that you are running your scripts properly:

Send tests of your scripts first

It’s important to test all scripts and custom commands on a single device before applying it to all your Mac devices. There are several ways you can do this, such as simply opening the device terminal application and running the script or command. You can check out the test panel by visiting this page and scrolling down to the custom command section.

With our MDM solution, you can remotely test the script in one of your devices first. Mosyle Manager provides a test panel in which you are able to select one or multiple devices and send the command, allowing to test the script to make sure everything is smooth before sending the command to the rest of the fleet of Mac devices.

Run scripts at the correct scope level of the macOS device

There are certain scripts that need to be run at the user level in order to properly work on the Mac devices, while other scripts have to be applied at the system level and run as root instead of the logged user.

For example, if you want to run a script to change the preferences of the Mac device, you usually need to run it at the user level since they are stored within the user library. It might also occur in different scenarios with other scripts and custom commands, and it's essential you make sure that the script is correctly coded, according to the scope needed.

Organize scripts and their responses

Organizing all the scripts sent to devices as well as their responses is very difficult to do manually and without the support of a tool that is able to keep track of the scripts responses and help you manage them more effectively across your Mac fleet.

It's hard to imagine how to manage this manually - even using a virtual repository can be difficult at some point when you are deploying thousands of Mac devices. An MDM solution can help you with this task by allowing you to remotely run scripts into Macs as well as managing all those custom commands.

Mosyle Manager also provides you with the criteria-specific groups of devices feature in which you are able to set groups of devices that will be updated according to the scripts response. That will definitely help you save time and efforts when running scripts in large-scale Mac deployment.

Next, we’ll explain user authentication using an MDM solution.