I was wondering if there's a script available that will allow me to trigger all of my policies in the order I desire.
Uploaded my current script (not fully grasped the usage of scripts yet)
I'd like it to be a manual trigger for all of my policies but ordered e.g. 10GoogleChrome,20IssueFilevaultkey etc
Please help :D
Best answer by Look
Here's the one I created to run arguments $4 thru $11 as custom triggers. Just put it in a policy and fill the parameters with the triggers in the order you want them run.
There are a couple of things you can do here.
You can build a global script that runs on enrollment complete, in this script you'd want to make sure that the user is actually logged in before the policies start running. (this sounds like what you're wanting to do, I've attached a script that I use, you can ignore the splashbuddy components.
or
To your first policy that runs at enrollment complete, add a files and processes payload to that policy. In your example, you have a custom event trigger set named to manual_trigger. So in the files and process payload in the last box you would type something like:
1jamf policy -event manual_trigger
This will trigger the policy that you're calling, then in the next policy you'd add another file and processes payload to trigger the following policy and so on, this will set them off like a daisy chain.
I suggest you take a look at a tool called SplashBuddy even if you don't use it you could maybe get a better understanding on how you can manage the order in which you want your policies to run.
Let me know if you have any questions, if you do decide to use splashbuddy, head over the the splashbuddy channel on slack and there are plenty of people there to help you get it setup.
Here is a script that I run on Enrollment Complete, it's the only policy I run at Enrollment complete and it calls all my other policies in order, feel free to cannibalize it any way you want.
Here's the one I created to run arguments $4 thru $11 as custom triggers. Just put it in a policy and fill the parameters with the triggers in the order you want them run.
I am curious about the details of how splashbuddy works with your policies names and package names. i haven't delved into Splashbuddy very far, so excuse my ignorance. From your script you aren't using the naming scheme that is recommended on the Splashbuddy Kickstart guide for your policies.
Is this because you are not using the enrollment trigger for you software installation and instead using a custom script to fire off the installs?
Thanks for you post, it helped me break through some issues I was having.
@matthew.johnson You are correct. I chose to use a global script to fire off all of the policies instead of relying on the 01, 02, 03 naming convention. I chose this method along with a files and process payload to handle other policies to they fire off in a very specific order. This allows me to troubleshoot any issues that arise with my enrollment workflow.
You still must use the required splashbuddy naming convention for the package names, ie anyconnect-4.5.pkg
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.