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.