As part of setting up Self Service policies in Jamf Pro, the usual practice is to include an icon to help the user distinguish between various Self Service policies.
However, when copying policy information via the API, a Self Service policy’s icon is sometimes not copied along with the rest of the policy. When this happens, it can be hard to figure this out later which ones were missed.
To help with situations like this, I have a script which does the following:
- Checks all policies on a Jamf Pro server.
- Identifies which ones are Self Service policies which do not have icons
- Displays a list of the relevant policies
For more details, please see below the jump.
The script is named Jamf_Pro_Detect_Self_Service_Policies_Without_Icons.sh. For authentication, the script can accept hard-coded values in the script, manual input or values stored in a ~/Library/Preferences/com.github.jamfpro-info.plist file.
The plist file can be created by running the following commands and substituting your own values where appropriate:
To store the Jamf Pro URL in the plist file:
defaults write com.github.jamfpro-info jamfpro_url https://jamf.pro.server.goes.here:port_number_goes_here
To store the account username in the plist file:
defaults write com.github.jamfpro-info jamfpro_user account_username_goes_here
To store the account password in the plist file:
defaults write com.github.jamfpro-info jamfpro_password account_password_goes_here
When the script is run, you should see output similar to that shown below.
The script is available below, and at the following address on GitHub: