Say you want to remove the old standard of .local from your domain and rename your domain to the proper ad.company.com. Follow these steps to rename your domain. Follow the reference link for pictures and the original post.
I suggest doing this in a test lab first!
a. Install and promote two domain controllers: DC0 and DC1
b. Install a member server like a file server and a workstation client as well.
NOTE: The key to the procedure is one domain member machine that is not a domain controller to perform almost all steps from. This can be a Windows 7 machine with Remote Server Administration Tool (RSAT) installed, but I prefer to use Windows 2008 R2 server since the rendom utility gets installed automatically as part of “Active Directory Domain Services” role. But make sure not to promote the machine to a domain controller as this machine should not be a domain controller.
On the domain joined server, (called FILE0 in my case) create a new DNS zone with the new domain. New records will start being created in that zone as soon as we perform the rename.
Run – cmd – rendom /list. A xml file will be created that lists the current domain that has info such as ForestDNSZones, DomainDNSZones, and Netbios name.
Edit this file to replace all mention of the old domain with the new domain name. In this case I’ve replaced all occurrences of untitled.local with thinkarabia.net and all occurrences UNTITLED with THINKARABIA.
Verify by running: rendom /showforest
Now that we feel more confident, it is time to upload the modified xml to our domain controllers using the command rendom /upload.
On the DC’s, turn off Windows Firewall and open up CMD to type: rendom /prepare.
Once they say successful, type: rendom /execute
After execution, all domain controllers will reboot at the same time! After they come back, take your FILE0 and reboot it TWICE to make it aware of the new domain change. On the second time coming up, your server will want to login using the old domain – ignore this and switch user. Login with the new domain name.
Group polices still reference the old domain names, and hence we need to fix it. Open up a command prompt and type:
gpfixup /olddns: untitled.local /newdns:thinkarabia.ent
gpfixup /oldnb:UNTITLED /newnb:THINKARABIA
- Now we rename the domain controllers themselves. Open up CMD and type:
netdom computername dc0.untitled.local /add:dc0.thinkarabia.net
netdom computername dc0.untitled.local /makeprimary:dc0.thinkarabia.net
- Restart both domain controllers. On FILE0, open up CMD and type:
- At this point, reboot all client machines twice in order for the changes to stick. Done!