
Metadata Cleanup Using NTDSUTIL in Windows Server 2008 R2
In the previous Active Directory article, we have seized an Operations Master Roles from the Offline Domain Controller to the New Domain Controller. After this, we have to clean out the offline domain controller data from the new domain controller. This process of removing data in AD DS is known as Metadata Cleanup. NTDSUTIL is used to clean up domain controller metadata. If a domain controller that is damaged and cannot be started from Active Directory service, we can then use NTDSUTIL to clean out the unsuccessful domain controller demotion, and it is very important that you do so. This will solve problems with slow login in domain controller, replication as well as knowledge Consistency Checker (KCC).
Here, KTM-DC01-2K8.msserverpro.com server is a failed domain controller, which we want to remove. To do this, we will use the NTDSUTIL command line tool.
Follow these steps to clean up the directory from a failed domain controller: 1. Open a command prompt, type ntdsutil and press Enter. 2. At the Ntdsutil prompt, type metadata cleanup and press Enter. 3. At the Metadata Cleanup prompt type connections and press Enter. 4. At the Server Connections prompt, type connect to server KTM-DC02-2K8 (where KTM-DC02-2K8 is the name of an available domain controller which holds Operations Masters Roles) (If you have not logged on using an account that is a member of the Enterprise Admins group, you can set your credentials at this point by typing set creds domainname username password and then press Enter) 5. At the Server Connections prompt, type quit and press Enter. 6. At the Metadata Cleanup prompt, type select operation target and press Enter. 7. At the Selected Operations Target prompt, type list domains and press Enter. This list all the domains in the forest are listed with a number associated to each. 8. At the Select Operations Target prompt, type select domain 0, where number “0” is the failed domain controller, and press Enter. 9. At the Select Operations Target prompt, type list sites and press Enter. This list all the sites in the forest are listed with a number assigned to each. 10. At the Select Operations Target prompt, type select site 0, where number “0” is the site containing the failed domain controller, and press Enter. 11. At the Select Operations Target prompt, type list servers in site and press Enter. 12. At the Select Operations Target prompt, type select server 0, where number “0” is the failed domain controller, and press Enter.
















Metadata Cleanup process is very important whenever the Domain Controller is non-functional for business continuity. The above article outlines how to carry out the Metadata cleanup process using NTDSUTIL in Windows Server 2008 R2 and this process also works in Windows Server 2003. I hope this helps.
virtual dedicated server, computer servers, windows server 2003, server windows, dedicated server, low cost dedicated server, servers, dedicated hosting solutions, windows 2003 server, dedicated hosting server, windows dedicated server, linux server, dedicated windows server, canada dedicated server, server, amd server, blade server, small business server, cheap dedicated server, custom servers
Pingback: Metadata Cleanup Using NTDSUTIL in Windows Server 2008 R2 cleaning up a old server from a good one | Computer Maintenance, Repair and Optimization!
Pingback: Remove DC from Domain | Just Another IT Blog
Hi! excellent tutorial, I follow step by step and everything is good, but i receive this error DsRemoveDsServerW error 0x5(Access Denied.) and I Cant clean metadata
Why use the command line if you can simply delete the offending DC in AD Users and Computers and then in AD sites & Services? Then do the manual metadata clean up you list?
The reason I comment is a I keep seeing many confusing sites that claim this is the way todo it but other that state the GUI, which is way easier for 99% of the peeps. NTDSUTIL may be the only solution for Server 2003 and earlier but not 2008R2.
Hi!
Excellent tutorial and step by step with full description.
Thank you
Sanjay Shukla
Nicely explained….Thanks for sharing it..
Thanks for sharing it, excellent tutorial.
thanks a lot.
unable to delete from NTDSUTIL – Metadata even after selecting the operation target. while remove the selected server prompt to select operation target.