Posted on 08-17-2017 02:20 PM
Hello,
I have not been able to figure out how to script in JAMF to have machines update their computer name at check-in. I'm aware of the "reset computer name" policy, but that won't work for what I'm trying to do going forward.
In short, I want my machines to update their computer name at check-in to; serialnumber-c
Any help? I'm running the latest version of Jamf, admin from MacOS, built of a Tomcat Apache Server.
Posted on 08-17-2017 02:51 PM
You should be able to modify this to work:
https://github.com/smashism/jamfpro-scripts/blob/master/set_computerName.sh
Adapt it by getting the serial number as a variable to pass instead, something like:SerialNumber=$(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}')
Posted on 08-18-2017 06:26 AM
I have to vouch for this script and say it works flawlessly; thanks @emily for providing it!