This article assumes that your have an existing DC to rename or a new DC installed you are wanting to move to, follow this guide to install the Server OS if not. Show
If don’t already have a domain in place then it might be best to head over to this guide which will guide you through setup of a new forest and domain. If you are running in a none production environment and are following this guide for testing only you can download an evaluation copy of Server 2019 from Microsoft here. Words of cautionIf you rename your DC by renaming a Domain Controller in the normal way you would rename a computer (using the System > Rename this PC gui), you didn’t do it right and your metadata is likely irreversibly damaged. However, I have seen success in this situation when multiple DC’s exist by demoting a re-promoting the DC. If only a single DC exists I would say its maybe a good idea to follow the below guide as it may get your out of the proverbial but probably not recommended and you may have to rely on backups. We take no responsibility if you get this wrong. However, if you do have issues we are happy to respond to emails. What will happen to clients using this DC?During the renaming process the below services will be impacted but can be mitigated by having a second DC in place.
Command Generation tool**NEW** – Try out our command generator to rename your Domain Controller hereStep 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> 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.“ To check the name has applied correctly run “netdom computername server.domain.local /enumerate” you should then see there are two names listed. renaming a domain controllerStep 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) netdom computername wrongname.domain.local /makeprimary:server.domain.localIf the command is successful you will get the below message. Step 4: Reboot the server.Pick your poison. I like “shutdown /r /t 0” in the cmd. shutdown /r /t 0Step 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. netdom computername server.domain.local /enumerateSYNTAX: netdom computername <newDCName FQDN> /remove:<oldDCName FQDN> (remember, in a command prompt) Type “netdom computername server.domain.local /remove:wrongname.domain.local“ netdom computername server.domain.local /remove:wrongname.domain.localStep 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. For any further help in renaming a domain controller please contact us here |