Skip to main content

Using NTDSUTIL Metada Cleanup to Remove a Failed/Offline Domain Controller Object.

https://chinnychukwudozie.com/2014/01/27/using-ntdsutil-metada-cleanup-to-remove-a-failedoffline-domain-controller-object/

In this post, I would like to talk about using the ntdsutil utility for metadata cleanup. A domain controller failure ‘DC00’ recently occurred in my lab. Running the repadmin /replsum command confirmed a replication error and showed DC00 as unavailable:

metadatacleanup04repadminerror

Since a dcpromo was obviously out of the question, I used the Ntdsutil metadata cleanup command to effect the removal in the following steps.

Start the Ntdsutil Tool:

Open a command prompt as an administrator. At the prompt, type ntdsutil and press enter. This put me directly in the ntdsutil mode. Entering ‘help’ shows all the options directly available :

ntdshelp

At the Ntdsutil prompt, select and type metadata cleanup command and press enter.

At the metadata cleanup prompt, type connections and press enter.

At the server connections prompt, type connect to server ws2012r2 and press enter. Where ws2012r2 is a domain controller dns name.

After connecting to the domain controller, type quit at the server connections prompt to exit out to the metadata cleanup prompt.

Now at the metadata cleanup prompt, type select operation target and press enter. Entering this mode, will enable me select the sites, domains and servers I intend to work with.

metadatacleanup02

ntdsselect

From the help options available at select operation target, select, and type list domains. Press enter.

At the select operation target type select domain 0. Where domain 0 is the intended domain.

At the next select operation target prompt, type list sites and press enter.

At the next select operation target prompt, type select site 0 and press enter.

At the next select operation target prompt, type list servers in site and press enter.

At the next select operation target prompt, type select server 1 where server 1 is the offline domain controller object I intend to remove. Press enter.

At the next select operation target prompt, type quit to exit out to the metadata cleanup prompt.

At the next metadata cleanup prompt, type Remove selected server.

metadatacleanup03

metadatacleanup01

metadatadialog

At the ‘Server Remove Confirmation Dialog’, click yes to remove the failed Domain Controller server object.After the removal is successful, I exit out of the ntdsutil tool by typing quit all the way up. I ran the repadmin /replsummary command again to verify and the result shows no replication errors.

metadatacleanup05repadminnoerrors

I still had to go into the DNS forward lookup and reverse lookup zones to manually remove references to the offline domain controller object.I hope this helps.