Computer name Changes

Contributor II

I enrolled several iMacs in one of our computer labs, that I didn't realize had a bunch of different non-standard computer names. Once I did realize it I went through each of the 8 machines in that lab (by sitting down at them) and changed their names to Art Lab 01, etc. However, when I do an empty search in Jamf Pro web portal, the new names are not listed, but rather the old computer names. How do I get them to update their names in the Jamf Pro portal? Thanks!


New Contributor II

Run sudo jamf setComputerName -name Art Lab 01 and then run a recon or reboot and it should sync up.

Contributor III

@mfurman is correct.

sudo jamf recon
on each of the iMacs will send all inventory information, including the computer name change, back to JAMF Pro.
Doing this at each computer, or write a policy and send it to all iMac will do the trick.

Waiting around a week will also update inventory information. the "sudo jamf recon" is automatically run once a week.

If you want to rename the iMac remotely, you may want to send the following scripts over:

scutil --set ComputerName <name> scutil --set HostName <name> scutil --set LocalHostName <name>

Contributor II

Thanks for the help! SO the setting in Jamf Pro, within the Update Inventory policy, where you can set the computer name is the opposite of this, right. If I have that checked, then whatever I se the computer name to in the Jamf Pro web portal will be sent down to the computer. Is that correct?