I've been told many times I'm going about this the wrong way, but I really want a simple solution that doesn't require a bunch of scripts, so....
We have all our devices in DEP. They are set to a prestage enrollment that has the directory settings set to Bind to AD and set the Client ID to LTM-$USERNAME at enrollment. This works fantastic. Machine starts up, goes to the management screen which requires authentication, user authenticates, machine is bound to AD with the correct name and shows in both Directory Utility as well as AD with the correct name.
The problem is, for whatever reason, this doesn't set the Computer Name to be that. The Machine shows up in JAMF as MacBook Air. A quick check of scutil shows the computer name, host name, and local host name are all MacBook Air.
So, assuming this isn't a bug or is "working as designed" which it really should be setting those all to the same thing at the bind, how do you call out the Client ID to write a script to set the Computer Name to be the same after it is bound?