macOS device rename not applying properlySolved

Participant
Discussion
2 weeks ago Apr 13, 2026

Hey guys, 

I’m trying to rename a few macOS devices using user details, but on some devices the rename just doesn’t go through. No proper error, it just doesn’t stick. Not sure what I’m missing here—any ideas? 

Replies (5)

Marked SolutionPending Review
Participant
2 weeks ago Apr 13, 2026
Marked SolutionPending Review

Hmm, I think I’ve heard of something like this before. What’s the username on one of the affected devices? 

Marked SolutionPending Review
Participant
2 weeks ago Apr 13, 2026
Marked SolutionPending Review

One of them is “Robert Williams”. 

Marked SolutionPending Review
Participant
2 weeks ago Apr 13, 2026
Marked SolutionPending Review

Ahh okay, yeah… that’s exactly what I was guessing 😄. The issue is the space. macOS (especially the LocalHostName part) doesn’t really handle spaces well. So, when the rename tries to apply that value directly, it just fails silently in some cases. 

I had a small script saved for this kind of scenario—basically you pass the values and set the name explicitly instead of relying on the default rename behaviour:

You can pass stuff like %name% and %devicenotes% into it. 

Marked SolutionPending Review
Participant
2 weeks ago Apr 13, 2026
Marked SolutionPending Review

Ohhh got it, that makes sense now. But how would I run this on the device? It’s with a field employee, so I don’t have direct access. 

Marked SolutionPending Review
Participant
2 weeks ago Apr 13, 2026
Marked SolutionPending Review

Yeah that’s pretty common. 

You don’t need physical access for this. Just use the execute script action from your console. Upload the script there, pass the required values as arguments, and push it to the device. 

We’ve done this for remote users as well, works without any issues 👍 

Save