The following procedure shows you how to rename an Active Directory domain.
- Open a command window in “administrator” mode and enter the following command which will generate a Domainlist.xml file:
- Edit the xml file, changing your old domain to the new one:
<?xml version ="1.0"?> <Forest> <Domain> <!-- PartitionType:Application --> <Guid>210a7b30-fca4-486b-a660-b4ff8bdc5271</Guid> <DNSname>ForestDnsZones.kreider.io</DNSname> <NetBiosName></NetBiosName> <DcName></DcName> </Domain> <Domain> <!-- PartitionType:Application --> <Guid>8815a697-1a11-4a28-ab88-58e7ec1d5876</Guid> <DNSname>DomainDnsZones.kreider.io</DNSname> <NetBiosName></NetBiosName> <DcName></DcName> </Domain> <Domain> <!-- ForestRoot --> <Guid>61b2edc1-6431-251c-fac2-bebc218bcbea</Guid> <DNSname>kreider.io</DNSname> <NetBiosName>KREIDER</NetBiosName> <DcName></DcName> </Domain> </Forest>
In the file, I modified kreider.local to kreider.io.
- Enter the following command to verify the match:
- Enter the following command to load the file:
- Enter the following command which will allow you to contact all the domain controllers and prepare them for the change.
- Enter the following command to start the renaming. The controllers will restart automatically:
- Enter the following to repair the GPO links:
gpfixup /olddns:kreider.local /newdns:kreider.io
Note: If you changed your NETBIOS name (up above in the XML file), you’ll need to run the following to update it. I didn’t in my particular situation.
gpfixup /oldnb:OLDNETBIOSNAME /newnb:NEWNETBIOSNAME
- The following command is to be passed when you are sure that all the stations have taken the name change into account because it removes the forwarders from the old name to the new one. I advise you to wait a few weeks especially if you have nomadic workstations.
As a result of this, you will also be able to delete the old DNS zone from your server.