Skip to main content
Question

Asset Tag

  • November 19, 2013
  • 3 replies
  • 4 views

Forum|alt.badge.img+5

Looking to see if anyone out there has had luck with inputting asset tags during the imaging process

3 replies

Forum|alt.badge.img+20
  • Valued Contributor
  • November 19, 2013

Our asset tags are our computer names as well.


Forum|alt.badge.img+18
  • Contributor
  • November 19, 2013

We handle it by using a custom app for the AD bind, and that is one of the reasons we have to do it that way (the other being we need to audit domain binds and I can't use a service account). We need to have the tech enter the asset number so it can be used to generate the computer name.

From there, I write the asset number to a plist with other info and it's pulled into an extension attribute. I don't use the pre-made Asset Tag field at all.


Forum|alt.badge.img+5
  • Contributor
  • November 20, 2013

We use the asset number in the computer name as well. So via a BASH script that chops out the unwanted you can place the asset into the JSS with;

jamf recon -assetTag "01234567"

Using the API also works, but I only used this to teach myself about the API.

echo "<?xml version="1.0" encoding="UTF-8" standalone="no"?>" > myfile.xml; echo "<computer>" >> myfile.xml; echo "<general>" >> myfile.xml; echo "<asset_tag>01234567</asset_tag>" >> myfile.xml; echo "</general>" >> myfile.xml; echo "</computer>" >> myfile.xml; curl -k -u username:password "https://jss.yourcompany.com:8443/JSSResource/computers/name/$computername" -T "myfile.xml" -X PUT