70-410-Renaming a Windows 2012 Server


Renaming a Windows 2012 Server


Please click the +1 button if you find this post helpful.


This post is intended to demonstrate some common methods for changing a computer name. The Command Line options  (Option 3 & Option 4) provide a good introduction to administrators unfamiliar with working with Server Core installations.

Option 1: GUI - Server Manager
Option 2: GUI - System Properties
Option 3: CLI - NETDOM
Option 4: CLI - SConfig

Option 1: GUI - Server Manager

The Server Manager loads automatically upon login on any Windows Server 2012 full installation. On any new installation, your first stop will likely be a visit to the Local Server (Properties) with in Server Manager. This screen is similar to what you would see upon first logging in to a Windows 2008 Server. You can perform all of your basic set up tasks, such as Changing the computer name and domain membership, enabling Remote Desktop, setting Network properties and the Time and Time Zone, and installing updates.

  1. From the Server Manager Dashboard, click Local Server in the left navigation pane.
  2. In the Local Server Properties window, click on the hyperlinked Computer Name. This will launch the familiar System Properties dialog. From here, the process is the same as using System Properties specified in Option 2.
Server Manager: Local Server
  1. On the Computer Name tab, click the Change button.
  2. Replace the contents of the Computer Name text box, with the new computer name. 
  3. Optionally, if you need to change your Domain or Workgroup membership, you can do so now, then click OK. 
  4. Click Apply/OK on the System Properties dialog to exit. You'll be prompted to restart your computer for the change to take affect.

Option 2: GUI - System Properties

Using the Computer Properties is arguably this most common method for changing the Computer Name and Domain or Workgroup membership. While in previous versions of Windows, getting here was as simple as right clicking on My Computer and selecting Properties, now, with My Computer being absent from the desktop or Start screen getting here becomes more complex if you're avoiding the Server Manager for some reason.

  1. From the Charms bar, click Settings.
  2. Click on Server Info. This takes  you to Control Panel, System and Security, System. (Which is yet another way to get here).
  3. Under Computer name, domain, and workgroup settings, click the Change Settings link.
Control Panel: System


  1. On the Computer Name tab, click the Change button.
  2. Replace the contents of the Computer Name text box, with the new computer name. 
  3. Optionally, if you need to change your Domain or Workgroup membership, you can do so now, then click OK. 
  4. Click Apply/OK on the System Properties dialog to exit. You'll be prompted to restart your computer for the change to take affect.
System Properties: Computer Name/Domain Changes



Option 3: CLI - NETDOM

Once you're familiar with the syntax for using NETDOM, you'll likely find it much easier and quicker, than using the GUI for common setup tasks such as changing the Computer Name. 

The command string below can be run on the local computer to change it's name.

> netdom renamecomputer %computername% /NewName: <NewComputerName> /REBoot


EXAMPLE: NETDOM -renamecomputer


For those of you unfamiliar with working on the command line or batch scripting, the percent sign encloses an environment variable. If you type "set" at a command prompt, you'll see the variables listed.

IMPORTANT: While you can execute netdom from within PowerShell, the Environment Variable %ComputerName% will not be recognized properly. 


EXAMPLE: SET (Environment Variables)

If you find the line starting with COMPUTERNAME= that will tell you the current name of your computer. While you could type in that name when using NETDOM, using the variable is often easier.

For example, let's assume this is a new installation. Microsoft has created a randomly generated name for your new PC or Server, such as the one in the Example above (WIN-APQHOUBNTL4). It would be easy to make a mistake typing this name and take additional time finding it. 

As with renaming a computer using the GUI, a reboot is required. This can be accomplished using the /REBoot switch at the end of the NETDOM command, or it can be issued separately using the "shutdown /r" command.

Option 4: CLI - SConfig

SCONFIG is a command line based application, reminiscent of those old DOS programs. Once launched the Server Configuration main screen will appear. You can then select the number for the action you want to perform, then simply follow the onscreen prompts. In my personal opinion, this is a bit cumbersome for many of the tasks, however it is a convenient and easy way to modify the network settings and install windows updates.

SCONFIG is available in both Core and Full installations and can be launched from either the command line or PowerShell. 
SCONFIG: Rename Computer

While an entire blog post could be devoted simply to SCONFIG, the purpose of this article is simply to demonstrate how to change the computer name. 

  1. From the Command Line type SCONFIG and press Enter.
  2. Once the Server Configuration menu appears, enter the number two (2), then press Enter.
  3. You'll be prompted to enter the new computer name, then press Enter.
  4. A popup dialog will prompt you to restart your computer. If you have completed your changes, click Yes, otherwise, if you need to make additional changes, you can click No, and restart by selecting option  13 from the SConfig menu, or existing and using the "shutdown - r" command. 
Applies To: Windows Server 2012, Windows 2012 R2

No comments :

Post a Comment