Correctly Renaming a Domain Controller

Source: Correctly Renaming A Domain Controller For A Seamless Easy Migration (theictguy.co.uk)

Step 1: Getting ready.

Open a command prompt. (Windows key+r (run) + cmd)

Step 2: Adding an alternate computer name.

SYNTAX : netdom computername <currentDC FQDN> /add:<newDCName FQDN>

2021 11 08 14 07 22 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
renaming a domain controller

In the command prompt, type (minus quotes) “netdom computername wrongname.domain.local /add:server.domain.local

This should return with “Added (NAME) as an alternate name for the computer. The command completed successfully.

2021 11 08 14 08 56 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more

To check the name has applied correctly run “netdom computername server.domain.local /enumerate” you should then see there are two names listed.

2021 11 08 14 09 27 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
renaming a domain controller

Step 3: Make the new name the primary.

SYNTAX: netdom computername <currentDC FQDN> /makeprimary:<newDCName FQDN>

Type netdom computername wrongname.domain.local /makeprimary:server.domain.local

IMPORTANT: This command will return successful, and warn you that you need to reboot immediately, as it may not authenticate logons (very important if only DC in forest)

2021 11 08 14 11 15 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
netdom computername wrongname.domain.local /makeprimary:server.domain.local

If the command is successful you will get the below message.

2021 11 08 14 11 37 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more

Step 4: Reboot the server.

Pick your poison. I like “shutdown /r /t 0” in the cmd.

2021 11 08 14 12 32 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
shutdown /r /t 0

Step 5: Check new server name.

Go to system properties and confirm new computer name. Or run “netdom computername server.domain.local /enumerate” to see both active names.

2021 11 08 14 13 48 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
netdom computername server.domain.local /enumerate

Step 6: Remove old hostname.

SYNTAX: netdom computername <newDCName FQDN> /remove:<oldDCName FQDN>

(remember, in a command prompt)

Type “netdom computername server.domain.local /remove:wrongname.domain.local

2021 11 08 14 13 19 Correctly Renaming A Domain Controller For A Seamless Easy Migration and 1 more
netdom computername server.domain.local /remove:wrongname.domain.local

Step 7: Paranoia.

in cmd, run a “dcdiag” to make sure everything is AOK.

Step 8: Clean up.

If you use logon scripts, remember to update the UNC paths with the new server name.

+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Leave a Reply

Your email address will not be published. Required fields are marked *