Skip to main content
Question

Script to update computer name at check in


Forum|alt.badge.img+1

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.

2 replies

emily
Forum|alt.badge.img+24
  • Employee
  • 870 replies
  • August 17, 2017

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}')


Forum|alt.badge.img+2
  • New Contributor
  • 8 replies
  • August 18, 2017

I have to vouch for this script and say it works flawlessly; thanks @emily for providing it!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings