Menu Close

Refresh Self Service via Files and Processes Payload Execute Command


While adding opt-in and opt-out Self Service policies to Jamf Pro 10, we wanted a way to force Self Service to refresh so new testers would immediately see available testing policies.


Add the Files and Processes Payload to your policy, then insert the following code into the Execute Command field:

/usr/bin/su - "/usr/bin/stat -f%Su /dev/console" -c "/usr/bin/osascript -e 'tell application "Self Service" to activate' -e 'tell application "System Events" to keystroke "r" using {command down}'"

Self Service should refesh after the policy is executed. (As always, your mileage may vary.)

Related Posts

Posted in Jamf Pro, Scripts, Tips & Tricks

Related Posts