Skip to main content
Question

Unable to rename laptop (Macbook Air) using a script on Policy on Jamf Pro

  • May 4, 2022 3:02 PM UTC
  • 28 replies
  • 411 views

Show first post

28 replies

howie_isaacks
Forum|alt.badge.img+24
  • Esteemed Contributor
  • May 5, 2022 1:49 PM UTC

Honestly haven't seen that issue myself but like I said it is a separate policy that runs during enrollment.

 



It doesn't do any harm for me to run the policy again. I'm sure I will figure it out. It doesn't happen often enough to light a fire under me to get it solved.


TonyNelson
Forum|alt.badge.img+3
  • New Contributor
  • Aug 28, 2025 2:16 PM UTC

when I run “jamf setComputerName -fromFile”

 

I get an error “You must specify a computer name.  Use the -name flag.”  The csv file contains the serial number followed by the computername.  shouldn’t this work?


sharriston
Forum|alt.badge.img+10
  • Valued Contributor
  • Aug 29, 2025 7:51 PM UTC

I have a one liner you can use in Files and Processes>Execute Command. It’s what we use for our generic enrollment name:

/usr/local/jamf/bin/jamf setComputerName -target / -useSerialNumber -prefix "M1-"