Posted on 06-27-2016 06:12 AM
Hi
I have been hunting around to find a better way to do this, but im coming up short. I want to be able to get a machines details using the asset tag, seems the only way to do it is loop over every machine in the jss.
Its not included in the basic subset, so thats no help.
Has anyone found a better way?
Posted on 06-27-2016 07:25 AM
Create an advanced search and save it. Make sure it displays the asset tag.
curl -H "Accept: application/xml" -sfku "$username:$password" "$server/JSSResource/computerreports/name/$savedSearchName" -X GET | xmllint --format - > /private/tmp/SavedReport.xml
Then you can go through that and look for the asset tag. @mm2270 get credit as he showed me that trick a while ago!