Networknet archive Blog

Windows Server 2008 Core: Rename the server with netdom.exe

Originally published Last updated 2 comments

Check the current computer name

Run hostname.exe to see the computer name generated by Windows Setup. Select the computer name and press Enter.

Code2 lines
1
2
c:\Users\Administartor>hostname
win2k8-vm

Rename the server

Rename the server to prepare it for dcpromo.

Code2 lines
1
2
c:\Users\Administartor> netdom renamecomputer win2k8-vm /newname:NET-DC-01
Click Y to reboot or enter shutdown /r /t 5

Windows Server 2008 Core rename screenshot.

2 comments

Comments from the original WordPress site, kept read-only.

  1. Joshua

    Another option is to use the %computername% variable. Then you don't have to look up the hostname and the only part that changes is the new name you want to name your server:
    netdom renamecomputer $computername$ /newname:NET-DC-01

  2. Joshua

    sorry, the "$" is a habit. The correct command is:
    netdom renamecomputer %computername% /newname:NET-DC-01