Skip to main content
Question

Jamf Policy Apps for Self Service Portal

  • Oct 30, 2024 12:47 PM UTC
  • 5 replies
  • 133 views

Forum|alt.badge.img+7

Hi All,

 

Has anyone got any information on how to create an app for the self service portal that allow a user run Jam policy script ?

 

sudo jamf policy

5 replies

danlaw777
Forum|alt.badge.img+17
  • Valued Contributor
  • Oct 30, 2024 12:51 PM UTC

#!/bin/bash

# Run the jamf policy command
jamf policy

# Exit the script
exit 0


danlaw777
Forum|alt.badge.img+17
  • Valued Contributor
  • Oct 30, 2024 12:55 PM UTC

or just use   jamf policy

(without the sudo) in the files and processes payload 


Forum|alt.badge.img+7
  • Valued Contributor
  • Oct 30, 2024 1:39 PM UTC

If you want to run a specific policy then use:  jamf policy -id {id number}

You can get the ID number from the URL of the policy in Jamf Pro (e.g. ........../policies.html?id=684&o=r)


Forum|alt.badge.img+17
  • Valued Contributor
  • Oct 30, 2024 1:45 PM UTC

If you want to run a specific policy then use:  jamf policy -id {id number}

You can get the ID number from the URL of the policy in Jamf Pro (e.g. ........../policies.html?id=684&o=r)


Since the Policy ID can't be reassigned if a policy is accidentally deleted, I almost always use the Custom Trigger option. Then you could use "jamf policy -event WhatEverYourTriggerIs".


Shyamsundar
Forum|alt.badge.img+14
  • Jamf Heroes
  • Oct 31, 2024 9:48 AM UTC

Use the file and process payload in the policy add sudo Jamf policy in the execute command and make it available in self service