Can I rename the domain name of an Active Directory? Of course you can!
Following are the critical points you need to consider before AD rename.
Once your infrastructure is ready, to perform the rename process we need an administrative computer or server. It must be a member of domain and should not a DC. It must have Remote Server Administration Tools installed.
In demo, I am going to rename contoso.com domain to canitpro.local domain. It is runs with windows server 2012 R2.
I have prepare a server which runs windows server 2012 R2 as member server to perform the rename. You can install Remote Server Administration Tools by Server manager > Add roles and features. Make sure you select AD DS and AD LDS tools under the RSAT.
Before we start the rename make sure forest domain activities are stopped. Such as adding new DC, changing forest configuration etc.
Also I went ahead and create the relevant DNS zone for new domain name in primary DNS server.
Then in the member server log in as domain admin and open the command prompt with admin rights.
First we need to create a report which explains the current forest setup. To do that type
rendom /list and press enter.
This will create an xml file with name Domainlist.xml in the path above command is executed. In my demo its C:\Users\Administrator.CONTOSO.
To proceed it need to be edited to match with the new domain name. Make sure you save the file after edits.
rendom /upload command from same folder path.
To check the domain readiness before the rename process type
Once its pass with no errors, execute
rendom /execute to proceed with rename. It will reboot all domain controllers automatically.
All workstations and servers will needs to reboot twice to apply changes. Username and password will not change, but the domain name will be new one.
With rename process domain controllers will not be renamed. Those need to change manually.
It can do using command
netdom computername DC.contoso.com /add:DC.canitpro.local
netdom computername DC.contoso.com /makeprimary:DC.canitpro.local, once complete, reboot the DC.
We can see it’s changed after reboot.
The next thing we need to fix is the group policies. It’s still uses the old domain name.
To fix this type and enter
gpfixup /olddns:contoso.com /newdns:canitpro.local
gpfixup /oldnb:CONTOSO /newnb:canitpro
We done with that too. The only thing we need to run is
rendom /end to stop the rename process and unfreeze the DC activity.
This ends the rename process and we have a dc now with a new domain name.