Hey all,
Anyone know if there is a way to get the Inventory > General > Asset Tag of machine read from the jss and get that into the ARD fields?
I use the 4 ARD fields of my machines.
ARD 1 is populated by a script the reads the IOREG > Machine Model
ARD 2 is populated by a script that reads the jamf version
ARD 3 is manually typed in with the Build Date
ARD 4 would like to populate by reading back the Inventory > General > Asset Tag of machine.
Here is the script:
#!/bin/bash
#Set Field 1 to MachineModel
machineModel=`ioreg -l | grep product-name | awk '{print $4}' | tr -d '<">'`
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -computerinfo -set1 -1 $machineModel
sleep 10
#Set Field 2 to JAMF Binary version
JSSVERSION=`jamf version`
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -computerinfo -set2 -2 $JSSVERSION
Thanks in advance as always.
-pat
