Using File and Processes to Call Another Policy

MBlank
Contributor

I currently have one policy that runs a script to rename a computer. This should happen directly after pre-stage enrollment. I then want this policy to call another policy that installs an agent for Jumpcloud.

 

Is the best thing to do use the Execute Command section of Files and Processes and then use the command:" sudo jamf policy" where jamf policy=InstallAgentPolicy?

 

Any suggestions on the best way to get this to work?

3 REPLIES 3

Andrew_Kuntz1
New Contributor III

in files and process you can do jamf policy -id x (x representing the ID of the policy)...You can find the ID of the policy you want to run in the URL when you select what policy you want to runScreen Shot 2021-10-22 at 9.18.23 AM.png

Instead of "files and process" you can just put Jamf policy -id x and the end of your script since that will be the last thing to run.

 

Hope this helps!

instead of -id you can also use -trigger!

 

In your "InstallAgentPolicy" you can set the trigger to a custom field of your choice (Something like AgentPolicy, InstallAgent, InstallAgentPolicy, InstallWithoutFailingPlz, 123321441, etc.) and set the frequency to ongoing... The policy will then only be ran if you issue the command jamf policy -trigger CustomTrigger

 

MBlank
Contributor

Thanks for all the help. I have this sorted 🙂