Every so often, a windows admin enters a new environment or has to upgrade his/hers domain controllers, and every so often, it doesn’t go perfect as planned. Some domain controllers’ records are left behind. When domain controllers are not cleaned up, other problems can begin to occur and reek random havoc on your network. Some of the problems are group policy issues, others are DNS resolution. This topic will cover how to clean up the mess that is left behind so that way your old environment’s domain controllers are gone and new environment is replicating and humming along. I also recommend following this after decommissioning and old domain controllers to make sure that it is 100% removed.
In Windows 2008 or newer domain controller versions, you can use 2 of the methods to clean up domain controllers. The first is in active directory. Launch active directory “Users and Computers”, locate your domain, expand your domain, and locate the domain controller OU. Right click on the server and delete.
A window will pop up and say you should run a DCPromo properly on that server, but this topic assumes you tried that.
Check the box and click Delete
Check the box and click Delete
Method 1 is now complete. Pretty Easy.
The second method is similar to first. Launch active directory “Sites and Services” expand you locations, expand your servers, and locate the NTDS settings object. Right click on the server and delete. You will be prompted similar in method 1, that you can no longer DCPromo the server properly and are you sure you want to delete it. Click the check box and delete. Then right click the server and delete that object as well.
Method 3 works on any version of Domain controller Microsoft server version. It is completed via a tool called ntdsutil.
First open command prompt as administrator on a domain controller
Type: ntdsutil
Type: metadata cleanup
Type: connections
Type: connect to server ‘xxxxxxx’ (where xxxxxx is the name of you primary domain controller you are not decommissioning)
Type: quit
Type: select operation target
Type: list domains
This will give you a list of all domains with corresponding numbers
Typically your domain will be 0
Type: select domain 0
Type: list sites
This will give you a list of all domains with corresponding numbers
Typically your domain will be 0 if you only have 1 location or your domain is setup as 1 location
Type: select site 0
Next you will select the server
Type: list servers in site
Type: select server “X” (where server X is the old domain controller)
First open command prompt as administrator on a domain controller
Type: ntdsutil
Type: metadata cleanup
Type: connections
Type: connect to server ‘xxxxxxx’ (where xxxxxx is the name of you primary domain controller you are not decommissioning)
Type: quit
Type: select operation target
Type: list domains
This will give you a list of all domains with corresponding numbers
Typically your domain will be 0
Type: select domain 0
Type: list sites
This will give you a list of all domains with corresponding numbers
Typically your domain will be 0 if you only have 1 location or your domain is setup as 1 location
Type: select site 0
Next you will select the server
Type: list servers in site
Type: select server “X” (where server X is the old domain controller)
All done. All 3 methods will work. I prefer method 3.
When complete, you will want to run a sync command on your domain controller to immediately tell the other servers that the server is gone.
Open command prompt:
Type: repadmin /syncall /edAPq
Then as one final check, launch DNS manager.
Locate your forward lookup zone
Locate your internal domain. Right click and go to propertied. Navigate to Name Servers tab.
Remove any DNS/Domain controllers that are no longer around
Locate your forward lookup zone
Locate your internal domain. Right click and go to propertied. Navigate to Name Servers tab.
Remove any DNS/Domain controllers that are no longer around
Then drill down through every DNS folder and record to make sure that is nothing lingering that referenced the Domain Controller that was removed, right click and delete it.
Now that you are all done. Do not allow that domain controller back on the network, or you will have to repeat these steps. Also, if things are still not right, a call over to Microsoft is worth it at this point. A small ticket fee to Microsoft and some of your time upfront will save you hours and maybe even days in the future as lingering domain controller records is effecting the core of your Microsoft network.
If you have any questions or would like assistance with this cleanup, contact service at 847.427.2365 or service@ccc1.com








Comments
Post a Comment