Monday, March 16, 2015

Rename Domain in Windows 2012 Server

How to rename a Domain in Windows 2012 Server

In a Windows Server 2012 domain you don’t have to separately install “Rendom” utility.
This tools gets installed as part of “Active Directory Domain Services” role when you promote a server to the DC role. It can be found: %windir%\system32\rendom.exe.
The existing domain is D and I will rename it to D.LOCAL.
Open your System Properties and check the existing domain name. This domain name is D.  This will be changing to d.local.
System
Open your Server Dashboard, then go to Tools & click DNS to open DNS Manager..
system_manger_DNS
In the DNS Manager, you need to create the New DNS Zone (d.local), this is to make sure that after whole process successfully, your member servers and Windows clients can join to new domain.
new_zone
On the Welcome to the New Zone Wizard, click Next
new_zone_wizard
On the Zone Type, Click Primary Zone and Next
primary
On the Active Directory Zone Replication Scope, click button To all DNS servers running on domain controllers in this domain:D.local then Next
domain_only
In the Zone Name, key in your new Domain Name, my new Domain Name
new_domain
On the Dynamic Update, Click Allow only secure dynamic updates (recommended for Active Directory) then Next
allow_secure
Completing the New Zone Wizard, click Finish
dns_complete
Open DNS Manager, you can view the new DNS name
dns_view
Next, open Command Prompt as Administrator
cmd
In the prompt , type rendom /list enter – this command is used to generate a state file named Domainlist.xml on the current domain. This file contains the current forest configurations.
rendom_list
Next open the computer in explorer and go to the C:\Users\Administrator folder
domainlist_view
Open the Domainlist.xml file. Right click the file name & click Edit.
domainlist_old
With the Domainlist.xml open, change this existing domain name to new domain
domainlist_new
SAVE the Domainlist.xml file
Close the file and return to prompt. Within the prompt, type rendom /showforest. This with show you the potential changes. This step does not make any modifications.
rendom_showforest
Type rendom /upload. This will upload the Domainlist.xml to the configuration directory partition on the domain controller.
rendom_upload
Type rendom /prepare. This will verify the readiness of each DC in the forest.
rendom_prepare
Type rendom /execute. This will verify all the DC’s and then performs the rename task
** Remember also there will be an interruption during this process. Once the process has completed, your DC will be rebooted.
rendom_exe
Once the DC(s) has reboot, log into the domain controller(s) with the administrator user .
windows_login
After you successfully log into the system(s), open System Properties and check the Domain Name.
domain_verify
Open the prompt and type gpfixup /olddns:d /newdns:d.local. This is to refresh all intradomain references and links to group policy objects.
gpfix_old_new
** If you are not changing the NetBIOS name skip this step.
type gpfixup /oldnb:d /newnb:d
Type rendom /clean. This will remove all the references of the old domain within AD.
rendom_clean
Type rendom /end. This is to unfreeze the forest configuration and allow further changes. The forest was frozen during the rendom /upload.
rendom_end
Open DNS Manager, select the new domain (d.local), here you can see your IP listed.
This will conclude the renaming of the domain. If you reboot the desktop computers 3-5 times the domain change should migrate.  If the changes do not migrate you will need to un-join these computers from the domain and re-join then back  on to the network.
** If you have DHCP running on one of your domain controllers.  You may need to stop and start the DHCP service.