Skip to main content
Question

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

  • May 4, 2022
  • 28 replies
  • 220 views

Show first post

28 replies

howie_isaacks
Forum|alt.badge.img+23
  • Esteemed Contributor
  • May 5, 2022

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
  • August 28, 2025

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
  • August 29, 2025

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-"