Device Management MDM

How to create and assign scripts for Mac

Scripts are essential tools for the efficient management and automation of tasks.

They enable you to execute specific actions on devices, such as running custom commands or performing automated tasks. You can easily assign scripts to individual devices or policies to ensure consistent execution across multiple devices.

Step 1 - Create your first script #

Go to the Applivery Dashboard and navigate to Device Management > Assets (1), then navigate to the Scripts (2) section and click on + Create Script (3).
create-script

A code editor will appear on the screen.

Inside the editor, you can either create a new script or upload an existing one from your device. This flexibility makes it easy to customize your scripts to your needs.

To create a new script, use the interface options and start typing.

To upload an existing script, click Load from file (4) in the editor, choose your script file, and it will be ready to use.

Finally, you must assign it a Name (5) (and optionally, a description), and click on Create (6).

Code editor for scripting

Step 2 - Assign Scripts to your devices #

Now, navigate to the Devices (1) section, choose the device to which you want to assign a script, go to the Scripts (2) tab, and click on the + Assign Script (3) button.
Assign Scripts

A modal view will appear, allowing you to choose a script from the script section or upload it from your device.

You will also have the option to select the execution method:

  • Once: The script will run once per device.
  • Loop: The script will run cyclically at the selected time interval.
  • On-demand: The script will never be run automatically and will only be offered as an optional item from Self-Service.
Adding Scripts - Execution method

Finally, you can view the execution history of your scripts by clicking on the Execution history button (4).

You can also access the execution history of a specific script by clicking on the script itself (5) or by clicking on the three vertical dots (6) located at the end of the script (where you can also Unassign it).

Execution history
Note
You can also assign scripts to policies, ensuring they apply to all devices under the same policy.To do this, navigate to the Policies section, select the desired policy, and click on the Scripts tab. The process will be the same as when assigning it directly to an individual device.
Was this article helpful?

— talk to an expert —

Schedule a demo