Device Name
The device name for Windows devices can be set via the Device name policy. The name is entered in the required Name field in the General section. User and device placeholders can be used; the portal lists them below the configuration under Available placeholders. One device name configuration is possible per policy.
The placeholders ${device.custom1} to ${device.custom5} only appear if the corresponding custom device property is enabled (see Custom Device Properties →).
A name without placeholders is assigned to every device that receives the policy; Relution does not check whether a name is already in use.
Example: device name from the serial number
All Windows devices in a device group are to receive a unique name consisting of the prefix PC and their serial number:
- Name:
PC-${device.serialnumber}
After the next restart, a device with the serial number ABC123456 is named PC-ABC123456.
Notes
Relution first inserts the placeholder values and then removes all characters except letters (a–z, A–Z, no umlauts), digits and hyphens, including from the inserted values. Leading and trailing hyphens are removed as well. The entered name and the name set on the device may therefore differ, e.g. Müller PC_01 becomes MllerPC01. After the placeholders have been inserted, the device name should be no longer than 63 characters.
If a device has no value for a placeholder, such as ${user.name} without an assigned user, that part of the name remains empty; a fixed part such as a prefix prevents the name from becoming completely empty. If the evaluation of an expression fails, for example because of an unknown function name, the entire entered text is used without replacement and cleaned up in the same way: PC-${device.serialnumber?upper} becomes PC-deviceserialnumberupper.
Further functions such as substrings, default values for unset fields, or replacing umlauts are described in Advanced placeholders →.
Relution sets the name via the ./DevDetail/Ext/Microsoft/DNSComputerName node of the DevDetail CSP →. The macros %RAND:x% and %SERIAL% described there cannot be used because Relution removes % and : before sending; PC-%SERIAL% becomes the fixed name PC-SERIAL. Relution does not restrict the configuration to specific Windows editions; Microsoft lists the node for Windows Pro, Enterprise, Education and IoT Enterprise. If the device reports an error while setting the name, no compliance violation is created.
If the configuration or the policy is removed from the device, the most recently set device name is retained.