As an Intune SE, we receive a lot of cases for this OMA-URI setting. Customers use it to create a local admin account for Intune enrolled devices but it always reports as failed.
By including this information, we can set the expectation and prevent future cases.
Incorporating the following info:
• This node edits the DNS hostname of the computer.
• If using the %RAND:x% or %SERIAL% macros, the new name is limited to 15 characters
• If the serial number generated from the %SERIAL% macro is too long, the serial number will be truncated from the beginning of the serial number sequence, not the end. (e.g. 123ABCDEF456 --> CDEF456)
• If the new name is a constant string (i.e. not using any of the macros) the new name can be up to 63 characters long
• Validation for accepted characters are based on the SetComputerNameEx function: https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-setcomputernameexa
• This node does not work properly for hybrid-joined AAD/AD devices (it only works for fully AAD joined devices)
I would love feedback and additional edits on how to make the proposed changes more customer-doc-friendly. Thanks!