Changing Share Name In Computer

Run script in one line.

Reset the Computer Name:
sudo scutil --set ComputerName samplecomputername Ex. Test\ Computer

Reset the Local Host Name:
sudo scutil --set LocalHostName samplelocalhostname Ex. Test-Computer

Reset the Host Name (if applicable):
sudo scutil --set HostName samplehostname Ex. Test\ Computer

Then run a "sudo jamf recon" command and you will see that the machine's name has updated in the JSS.

Go ahead and restart the computer.
Creation date: 2/8/2017 12:42 PM      Updated: 12/29/2023 12:14 PM