Home > Articles > Home & Office Computing > Microsoft Windows Server

Scripting the Computer Name

  • Print
  • + Share This
In many deployments, companies use the BIOS service tag or asset tag as part of the naming algorithm. Unfortunately, the out-of-the-box naming mechanisms don't provide for this type of naming standard. To work around the limited options, Windows 2000 deployment expert Jeffrey Ferris shares a script that he developed to extend the computer-naming mechanism.

In many deployments, companies use the BIOS service tag or asset tag as part of the naming algorithm. Unfortunately, the out-of-the-box naming mechanisms don't provide for this type of naming standard. To work around the limited options, Windows 2000 deployment expert Jeffrey Ferris shares a script that he developed to extend the computer-naming mechanism.

One of the limitations of the out-of-the-box unattended installation process is the incapability to easily extend the computer-naming mechanism. With the exception of a RIS-based install, there are only two options for naming a computer via an unattended installation script. The first is to give the computer a static name, which means that you'll need a separate answer file for every unique computer name. The second option, which is more useful if you're trying to use a single answer file for multiple installs, generates a random 15-character computer name based on the organization name under which Windows 2000 is registered.

To illustrate the second option, look at the following excerpt from a Windows 2000 unattended installation file:

[UserData]
FullName="Information Systems"
OrgName="ABC Corporation"
computername="*"
productid=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

In this example, the computer name will be ABC-xxxxxxxxxxx, where each x is a randomly generated letter or number.

Computer Names with RIS

With a RIS-based installation, you can set up the naming standards based on one of five variables:

  • %First, the user's first name

  • %Last, the user's last name

  • %Username, the user's logon name

  • %MAC, the MAC address of the first recognized network interface card

  • %#, an autoincrementing number

These variables can be combined and mixed with static text. For example, you could set the computer name standard for a RIS image for notebook users as the following:

PORT-%Username%#

For user Joe Sales with the login of jsales, the computer name for the first image that Joe downloads using RIS would be this:

PORT-JSALES1
  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.