One method for changing the device name is to deploy scripts to the device. Our Creating and Running Scripts on Your Devices article provides a thorough explanation of how to push scripts to your devices.
Changing a Device's Name with Scripts
The following commands can be used to change the various name parameters of your machines:
sudo scutil --set HostName [Desired device name]
sudo scutil --set LocalHostName [Desired device name]
sudo scutil --set ComputerName [Desired device name]
The device name may not change until the DNS cache has been cleared, which can be accomplished by running the following command:
killall -HUP mDNSResponder