Set the Computer Naming Policy

Applies To: Windows Server 2008

You can use the Directory Services tab to specify the computer naming policy. Alternatively, you can create the computer account by prestaging client computers or by creating a custom user interface. For more information about these options, see Alternative ways to create computer accounts.

The automatic naming policy is based on the user's name and adds an incremental number to ensure that the computer name is unique. The settings on this tab will be applied when using the Pending Devices policy to create a computer account and when using the Windows Deployment Services client to create a computer account.

The following table outlines the variables that you can specify to create the customized name. You can use these options separately, or you can combine them. In addition, you can limit the length of the computer names by adding a numerical value to the text string.

Variable Result

%First

The user's first name is used as the computer name.

%Last

The user's last name is used as the computer name.

%Username

The user name is used as the computer name.

%MAC

The network adapter media access control (MAC) address is used as the computer name.

%[0][n]#

The computer name includes an incremental number containing n digits. To include zero-padding in the incremental number, type a zero as shown. For example, if you use %03#, a three-digit number in the range from 001 through 999 is used.

Examples

  • If you want to limit the computer name to three characters of the user's last name with a two-digit incremental number appended, you would type the string %3Last%02#. For example, for the fifth computer user whose last name is Smith the corresponding computer name would be Smi05.

  • If you want the computer name to consist of the first three letters of the user's first name, followed by the first three letters of the user's last name, followed by a three-digit incremental number, type the string %3First%3Last%03#.

Issues

Note the following issues when you set the client naming policy:

  • 15 characters is the maximum length for a computer name. However, the default policy allows names that are up to 63 characters. When a name that is more than 15 characters is generated, any characters after the first 15 will be truncated, and the computer will be unable to join the domain. You must specify a naming policy that generates names with 15 or fewer characters.

  • The computer name can contain only standard characters. The Auto-Add policy will fail if the computer name contains non-standard characters. The allowed characters are defined in Request for Comments (RFC) 1123 as follows: all uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), and the hyphen (-).

Alternative ways to create computer accounts

There are two additional ways to create the client computer account. The following methods do not use the settings specified on the Directory Services tab. In addition, if Pending Devices are enabled, you can overwrite these settings when you approve each device.

  • Prestage the client computer. For more information, see Create Pending Devices.

  • Create a custom user interface that prompts users for the domain join information. You can create a custom user interface to specify the computer name and organizational unit before installation. For instance, you can write a script that runs within Windows Preinstallation Environment (Windows PE) that captures the computer name and organizational unit information, places it into an unattend installation file, and then starts Setup.exe. Microsoft Solution Accelerator for Business Desktop Deployment 2007 is an application that provides this level of customization (https://go.microsoft.com/fwlink/?LinkId=71137).

Additional considerations

  • To perform this procedure, you must be a member of the Account Operators group or Domain Administrators group, or you must have been delegated the appropriate user rights.

Additional references