Skip to content

Instantly share code, notes, and snippets.

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 stevewood-tx/53ab550a5568f873c973aac15d37da65 to your computer and use it in GitHub Desktop.
Save stevewood-tx/53ab550a5568f873c973aac15d37da65 to your computer and use it in GitHub Desktop.
Lookup Jamf Computer ID
JSS_ID=$(curl -H "Accept: text/xml" -sfku "${jss_user}:${jss_pass}" "${jss_url}/JSSResource/computers/serialnumber/${serial}/subset/general" | xpath /computer/general/id[1] | awk -F'>|<' '{print $3}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment