Clean up server metadata using ntdsutil

Metadata cleanup has to be performed when your DC was forcibly removed (server was stolen, broken, burned (?), removed) and you cannot access it anymore. You have to perform metadata cleanup on a domain controller in the same domain as the domain controller that you forcibly removed. Metadata cleanup removes data from AD DS that identifies a domain controller to the replication system, File Replication Service (FRS) and Distributed File System (DFS) Replication connections and attempts to transfer or seize any operations master (FSMO) roles that the retired domain controller holds.

This task can be performed in two ways – over GUI (using ADUC or AD Sites and Services) or using Command Line. I’m going to describe CLI method.

Open a console window (as an administrator) on one of your domain controllers (in the same domain as removed DC) and start ntdsutil, then follow steps executed in the code-boxes below:

We are connected to domain, now it’s time to select our site and target server:

Site and server is selected, now it’s time to remove metadata:

After running “remove selected server” command you will be prompted with confirmation popup:

2015-02-05 10_14_40-sneu2013 - Remote Desktop Connection

Just hit Yes to continue removal. All done.

To confirm removal of the domain controller:

Open Active Directory Users and Computers. In the domain of the removed domain controller, click Domain Controllers. In the details pane, an object for the domain controller that you removed should not appear.

Open Active Directory Sites and Services. Navigate to the Servers container and confirm that the server object for the domain controller that you removed does not contain an NTDS Settings object. If no child objects appear below the server object, you can delete the server object. If a child object appears, do not delete the server object because another application is using the object.

One thought on “Clean up server metadata using ntdsutil

  1. Great write up! I browsed quite a few articles and tried a couple, with dead ends. Until I found yours, really saved me a lot of time.

Leave a Reply