In Active Directory 2008 and 2008 R2, you can easily clean up metadata by using
Ntdsutil.exe. Ntdsutil is a command-line tool that is found on Domain Controllers and computers that have RSAT installed.
To clean up server metadata by using Ntdsutil:
1) Open a command prompt and RUN AS an Enterprise Admin. On the Start menu, right-click the Command Prompt shortcut, and then click Run as administrator. If the User Account Control dialog box appears, provide Enterprise Admins credentials, and then click Continue.
2) At the command prompt, type the following command, and then press ENTER:
3) At the Ntdsutil prompt, type the following command, and then press ENTER:
4) At the metadata cleanup: prompt, type the following command, and then press ENTER:
remove selected server SERVERNAME OR
remove selected server SERVERNAME1 on servername SERVERNAME2
selected server SERVERNAME1 refers to the distinguished name (DN) of the domain controller whose metadata you want to remove, in the form
cn=ServerName,cn=Servers,cn=SiteName, cn=Sites,cn=Configuration,dc=ForestRootDomain. If you specify only one server name, the objects are removed from the current domain controller.
servername specifies removing server metadata on
SERVERNAME2, the DNS name of the domain controller to which you want to connect. Specify a domain controller that is a replication partner of the removed domain controller.
5) In Server Remove Configuration Dialog, review the information and warning, and then click Yes to remove the server object and metadata.
Ntdsutil will confirm that the domain controller was removed successfully. If you receive an error message that indicates that the object cannot be found, the domain controller might have been removed earlier.
6) At the
metadata cleanup: and
ntdsutil: prompts, type
quit and then press ENTER.
7) Confirm the removal of the domain controller using these steps…
Open the Active Directory Users and Computers. In the domain of the removed domain controller, click Domain Controllers container. In the details pane, the object for the domain controller that you removed should not appear.
Open the Active Directory Sites and Services console. 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.