Active Directory,  Windows Server

Rename a Windows 2012 Server Using PowerShell

When you are creating a bunch of Server 2012 Virtual Machines (or physical machines for that matter) it is helpful to programmatically change their names. To do so, use the Rename-Computer PowerShell cmdlet followed by the name you want the computer to have, as follows (assuming a name of 2012.krypted.com):

Rename-Computer 2012.krypted.com

Before you do anything else (e.g. bind to AD) you should then reboot the host, using the Restart-Computer cmdlet:

Restart-Computer