Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created April 5, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/f3298fa97d06bbee7d98b149b11bb9c6 to your computer and use it in GitHub Desktop.
Save rtrouton/f3298fa97d06bbee7d98b149b11bb9c6 to your computer and use it in GitHub Desktop.
Get all policy IDs for a specified Jamf Pro policy category
/usr/bin/curl -ksf -u api_username_goes_here:api_password_goes_here -H "Accept: application/xml" https://server.name.here/JSSResource/policies/category/Policy_Category_Goes_Here | xpath "policies/policy/id" | sed 's/\<id>//g' | tr '</id>' '\n' | sed '/^s*$/d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment