I've done something similar in imaging workflows, although rather than calling the policy by it's ID, I prefer to assign the policy a custom trigger (you can call this anything you want, like 'printer') and then call it in my script like this.
I've done something similar in imaging workflows, although rather than calling the policy by it's ID, I prefer to assign the policy a custom trigger (you can call this anything you want, like 'printer') and then call it in my script like this.
@tcandela you'll still need to scope to something. The beauty of a policy that uses only a custom trigger is that you could conceivably scope to everything since the only way the job gets called is by trigger.
However, you could scope to a Smart Group and assign these machines based on some criteria.
@tcandela jamf policy -trigger was the verbiage used in in older JAMF Binaries. While jamf policy -trigger still works I would recommend using jamf policy -event moving forward. If you do a jamf help policy that will show the current options.