Each script deployed with Jamf Pro can receive up to eleven parameters. The first three parameters are automatically passed to the script in the order shown below. The remaining eight parameters can be defined when adding the script to a policy or Casper Remote.
|$1||Mount point of the target drive|
|$3||Username, specifically: |
-If the script is run with a login or logout policy—Username of the account used to log in or out of the computer
-If the script is run from Self Service—Username of the account used to logged in to Self Service
The eight definable parameters are displayed as “Parameter 4,” Parameter 5,” Parameter 6,” etc in the policy and Casper Remote interfaces. You can customize those labels to make the interfaces more intuitive.
The following examples show the policy interface without and with custom parameter labels:
Policy without Custom Parameter Labels
Policy with Custom Parameter Labels
Here is an example of using parameters to pass account credentials with a script and a policy:
Add the script to Jamf Pro. See "Adding a Script to the JSS" in the "Managing Scripts" section of the Casper Suite Administrator's Guide.
The script might look something like this:
(Optional) When adding the script, click the Options tab and enter custom labels for the Parameter fields.
Create a policy to run the script. See "Running Scripts Using a Policy" in the Casper Suite Administrator's Guide.
When entering information about the script, a pane with custom Parameter labels might look like this:
Encrypted Script Parameters
Shows a workflow that can be used to encrypt script parameters.
Explains to how ensure the security of the scripts deployed with Jamf Pro.
Jamf wants to hear your feedback around Jamf Pro: LDAP Servers and Reports!