Scripts
- Last UpdatedMay 20, 2025
- 3 minute read
- Enter parameter labels
- Parameters in scripts make it easier to reuse the same script for multiple scenarios by defining values to be used across various places within the script. In Jamf Pro, you can label these parameters to clarify their purpose. For instance, if a script uses "$4" for a printer name, you can label that parameter as "Printer name" in Jamf Pro. This label will then display in the interface when creating a policy with that script, reminding you what value should be used to substitute with the parameter.
- Specify operating system requirements for running the script
- Specifying an operating system requirement for a script allows Jamf Pro to skip running it on incompatible computers.
- Set the priority order for the script
- In some situations, the order in which a script is run compared to other elements of a policy may be important. For example, if you want to create a new local user account on a computer and then run a script that takes an action on that user account, you might configure script priority set to After to ensure that the account exists before the script is run.
- Add the script to a category
- Categories allow you to group policies, packages, scripts, and printers in Jamf Pro. You can also use categories to group policies, configuration profiles, apps, and books in Jamf Self Service. This makes these items easier to locate. For more information, see Categories.
You can add a script to Jamf Pro using the script editor.
- In Jamf Pro, click Settings in the sidebar.
- In the Computer management section, click Scripts .
- Click New.
- Use the General pane to configure basic settings for the script, including the display name and category.
- Click the Script tab and enter the script contents in the script editor. You can use the settings on the tab to configure syntax highlighting and theme colors in the script editor.
- Click the Options tab and configure additional settings for the script, including the priority and parameter labels.
- (Optional) Click the Limitations tab and configure operating system requirements for the script.
- Click Save .
When you run a script, you can choose a priority for running the script. You can also enter parameter values for the script.
When running a script that contains HTML tags in the output, the tags are not rendered in policy logs.
To run a script on computers, the script must be stored on the distribution point you plan to deploy it from and in Jamf Pro, or in the Jamf Pro database.
The policy runs on computers in the scope the next time they check in with Jamf Pro and meet the criteria in the General payload.
Jamf Pro truncates the output of policy logs after they reach 25 KB in size. If your environment relies on scripts with detailed error messaging, you may want to modify them to minimize the outputs to simplify potential troubleshooting measures in the future.