Skip to content

Instantly share code, notes, and snippets.

@jps3
Created February 14, 2019 15:55
Show Gist options
  • Save jps3/9002cd26a8e19df97497d400388fb079 to your computer and use it in GitHub Desktop.
Save jps3/9002cd26a8e19df97497d400388fb079 to your computer and use it in GitHub Desktop.
function jamf_query_computer () {
name="${1:-myjamfcomputer}";
curl -X GET -sL -H 'Accept: application/json' --user "${JAMF_API_ROUSER}:${JAMF_API_PASSWORD}" https://${JAMF_INSTANCE}.jamfcloud.com/JSSResource/computers/match/${name}
}
jamf_query_computer_pretty () {
jamf_query_computer $* | jq -C .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment