Changing the hostname of a macOS device from HexnodeSolved

Participant
Discussion
13 hours ago Nov 13, 2026

I’m managing macOS devices in Hexnode and need to change the computer name/hostname of a Mac. I was looking for a remote action to rename the device, but I can’t find a direct option for macOS. Is there a way to do this from Hexnode?

Replies (1)

Marked SolutionPending Review
Hexnode Expert
2 hours ago Nov 13, 2026
Marked SolutionPending Review

For macOS devices, the hostname cannot be changed directly using the standard Hexnode remote actions.

The recommended approach is to deploy a custom script to the Mac. A typical rename script sets the macOS ComputerName, LocalHostName, and HostName values using scutil.

Example:

‍Replace <new-hostname> with the required name, then deploy the script to the target macOS device from Hexnode using the custom script deployment option.

Note: LocalHostName should not contain spaces or unsupported special characters. If the computer name has spaces, use a simplified version for LocalHostName.

Regards,
Mary Romero

Save