Tutorials

Specify Alternate Text

How to rename an Active Directory domain name of a Windows Server 2012 R2 with the Essentials Experience role installed

Just recently I had a startup client who chooses a company name that some other company really liked and they offered a big bag with money for that name but the startup had already set up their domain name on the Active Directory with Windows Server 2012 R2 + Essentials Experience role. 

We had to find a way to ‘rename’ the AD domain name without reinstalling the OS, we don’t want to do a clean installation for obvious reasons.

This looked complicated but in the end, I found that it is not so difficult. This procedure is tailored to a single Domain Controller situation as most smaller companies have. If you attempt to rename a domain in a larger forest with multiple domains and/or subdomains and/or trusts between forests I would think twice before starting this procedure but if you must start reading here How Domain Rename Works: Active Directory.

You also need to be aware Exchange Server is not the only server application that heavily depends on AD domain naming. If you have other application that depends on Active Directory domains you must verify that those applications accept or allow domain name changes.

The startup was named Adatum, Inc and because this name was sold they had to find another name and this was Contoso, Inc.

There are a couple of things you need to know before you can proceed with this:

  1. If in your Active Directory there is an Exchange Server installed on a member server then the procedure is NOT for you. Exchange Server versions later than 2003 do not allow domain rename procedures.
  2. You need to disable any Office 365 or Azure integration before you start this procedure.
  3. All clients need to be ‘reconnected’ with the Connect software to make them visible in the Essentials Dashboard. It is probably a good idea to shut down all client computers before you start with this procedure.
  4. All clients require at least two reboots to become aware of the new domain name.
  5. You must create a DNS zone for the new domain name.
  6. You must uninstall the Essentials Experience and run Cleanup, Active Directory Certificate Services (Certification Authority) and (Certification Authority Web Enrollment) before you can start the rename procedure.

Before we can start the procedure we need to remove the Essentials Experience role and as you will see in the next steps it required us to remove Active Directory Certificate Services before we can remove the Essentials Experience role. But before you do this you must be aware of the fact that removing Active Directory Certificate Services can have serious consequences if you have encrypted files on your server. In The Encrypting File System is described how Active Directory Certificate Services is involved in encrypting files. You can migrate and save settings for Active Directory Certificate Services but this is not part of this tutorial.

  1. Our domain is ‘adatum.local’ and because the company name Adatum, Inc was sold we choose a new name Contoso, Inc. We need to change the AD domain name.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  2. Click Manage and then Remove Roles and Features.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  3. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  4. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  5. Uncheck ‘Windows Server Essentials Experience’ .
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  6. You must run the Windows Server Essentials Cleanup wizard first.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  7. Check to confirm and click Run
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  8. Close
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  9. Start Remove Roles and Features again and uncheck ‘Windows Server Essentials Experience’, click Next.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  10. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  11. Click Remove
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  12. Click close and reboot the server
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  13. Restart
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  14. Choose a reason
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  15. Once you are back and logged on again restart Remove Roles and Features again.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  16. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  17. This is a two stage procedure because you cannot uninstall ADCS with all options unchecked. You must first uninstall Certification Authority Web Enrollment. Uncheck that and click next.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  18. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  19. Remove
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  20. Close
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  21. And again start Remove Roles and Features.
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  22. Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  23. Uncheck Certification Authority
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  24. Remove features
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  25. With Certification Authority unchecked click Next
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  26. Click Remove
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.
  27. Click Close
    Prepare the Windows Server 2012 R2 with the Essentials Experience role for an Active Directory rename operation.

The new domain name must be known in DNS so we need to create some DNS records for that. Here is how you do that.

  1. From Server Manager click Tools and then DNS.
    Add the new DNS zone named after the new domain name
  2. Right click Forward Lookup Zones and choose ‘New Zone’.
    Add the new DNS zone named after the new domain name
  3. Next
    Add the new DNS zone named after the new domain name
  4. Next
    Add the new DNS zone named after the new domain name
  5. Next
    Add the new DNS zone named after the new domain name
  6. The name of the new zone as the name for your AD domain name. Our new domain name will be contoso.local
    Add the new DNS zone named after the new domain name
  7. Next
    Add the new DNS zone named after the new domain name
  8. Finish
    Add the new DNS zone named after the new domain name
  9. There is the new zone.
    Add the new DNS zone named after the new domain name

In the start of this tutorial I mentioned a Technet document How Domain Rename Works: Active Directory. If you have some time over please go there and read it. I found this really interesting and it helped me understand this procedure. In addition to this read Appendix A: Command-Line Syntax for the Rendom Tool to get more information on the command line options for ‘rendom.exe’.

  1. Start an elevated command prompt.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  2. Accept the UAC warning and click Yes.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  3. Type rendom /list
    rendom /list
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  4. Type notepad domainlist.xml
    notepad domainlist.xml
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  5. There are the old domain names.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  6. Press CTRL-H to open the replace Windows and type in the names of your old. Click Replace all to replace the old names with the new ones.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  7. Check the values and save the XML file.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  8. Type rendom /upload
    rendom /upload
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  9. Type rendom /prepare
    rendom /prepare
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  10. Type rendom /execute
    rendom /execute
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  11. Directory Services are shutting down and the server will restart.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  12. I tried to login with the old domain but that did not work.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility
  13. Now I will try with the new domain ‘contoso.local’ and that will work.
    Start the Active Directory domain rename procedure with the ‘rendom’ utility

There is one step we still need to do on the domain controller. If you look in System settings you will find that the server is still named ‘server01.adatum.local’ and that needs to be changed.

Use netdom utility to rename the Active Directory Domain Controller.

  1. Here is how we do that. Right click the Start menu and choose to start an elevated command prompt. Run netdom computername server01.adatum.local /add: server01.contoso.local
    netdom computername server01.adatum.local /add: server01.contoso.local
    Use netdom utility to rename the Active Directory Domain Controller.
  2. Now run netdom computername server01.adatum.local /makeprimary: server01.contoso.local You need to reboot the server now.
    netdom computername server01.adatum.local /makeprimary: server01.contoso.local
    Use netdom utility to rename the Active Directory Domain Controller.

With gpfixup tool we change the old references to the new domain. More information can be read here Gpfixup

  1. Open an elevated command prompt on the server and run: gpfixup /olddns:adatum.local /newdns:contoso.local
    gpfixup /olddns:adatum.local /newdns:contoso.local
    Fix domain name dependencies in Group Policy Objects and Group Policy links after a domain rename operation
  2. And another gpfixup command that needs to be run: gpfixup /oldnb:adatum /newnb:contoso
    gpfixup /oldnb:adatum /newnb:contoso
    Fix domain name dependencies in Group Policy Objects and Group Policy links after a domain rename operation
  3. Final step to end the domain rename procedure is to run rendom /end. This unlocks the Active Directory for any schema changes. Reboot the server TWICE and check the logs for any errors.
    rendom /end
    Fix domain name dependencies in Group Policy Objects and Group Policy links after a domain rename operation

After a domain rename procedure it is always a good idea to run DCdiag and check the output.

  1. From the start menu start an elevated command prompt and type DCDIAG /test:DNS /DNSALL /e /v
    DCDIAG /test:DNS /DNSALL /e /v
    Run DCDiag to check for possible issues in the Active Directory
  2. Now run DCDIAG /test:RegisterInDNS /DNSDomain:contoso.local
    DCDIAG /test:RegisterInDNS /DNSDomain:contoso.local
    Run DCDiag to check for possible issues in the Active Directory

When everything is OK and the tests we ran in the previous chapter completed OK we can proceed and 'reinstall' the Essentials Experience role.

  1. From Server Manager choose Add roles and features
    Reinstall the Essentials Experience role on the server.
  2. Next
    Reinstall the Essentials Experience role on the server.
  3. Next
    Reinstall the Essentials Experience role on the server.
  4. You see, there is our new domain name listed. Choose next
    Reinstall the Essentials Experience role on the server.
  5. Check ‘Windows Server Essentials Experience’. This will also install and configure Active Directory Certificate Services.
    Reinstall the Essentials Experience role on the server.
  6. Next
    Reinstall the Essentials Experience role on the server.
  7. Next
    Reinstall the Essentials Experience role on the server.
  8. Next
    Reinstall the Essentials Experience role on the server.
  9. Install
    Reinstall the Essentials Experience role on the server.
  10. Click ‘Configure Windows Server Essentials’.
    Reinstall the Essentials Experience role on the server.
  11. Configure
    Reinstall the Essentials Experience role on the server.
  12. It is done and click close.
    Reinstall the Essentials Experience role on the server.

The Essentials Dashboard shows us normally the list with computers in our network. It still does but it mentions that the status is 'Removed'. We will bring those computers back to the Dashboard by running the Connector software on each client computer.

  1. If you start the Dashboard the first time after you have reinstalled it you may find computer accounts that show ‘Removed’ but actually they are NOT removed. What you see is the left over Archived Computer Backups for that Computer account and we need to remove those archives before we can continue. If you find any archived backups remove them.
    Fix computer accounts on the Windows Server Essentials Dashboard
  2. Here is proof the Computer account is still there, no worries. To get the Computers listed again in the Dashboard we need to run http://servername/connect and because the computers are already joined to the domain (even with the renamed domain) this is really quick. As soon as the Connect software is ‘reinstalled’ on the client computers they will also show in the Devices tab in the Dashboard.
    Fix computer accounts on the Windows Server Essentials Dashboard
  3. After I ran the Connector software the desktop showed up again in the list with Devices on the Dashboard.
    Fix computer accounts on the Windows Server Essentials Dashboard

About www.server-essentials.com 

www.server-essentials.com is founded by Mariette Knap, a Dutch Microsoft MVP. www.server-essentials.com is a community for IT Consultants and Business Owners who, themselves, take care of the IT infrastructure and Employees who do that little extra in the company to keep things running. Our forum is for discussing all things ‘IT’ and more.  Our documentation is top notch and written by and for the community.

Change your cookie settings


 
Contact Us
(030) 2250455

International: +31302250455

 

Concentrix BV

C. de Rijcklaan 1

3723 PM Bilthoven

The Netherlands

KvK 30202318

VAT Id 814036739B01

The layout of this page is made to be viewed online.