Created
April 5, 2017 20:55
-
-
Save rtrouton/f3298fa97d06bbee7d98b149b11bb9c6 to your computer and use it in GitHub Desktop.
Get all policy IDs for a specified Jamf Pro policy category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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