Perform Active Directory Metadata Cleanup

Perform Active Directory Metadata cleanup

I hope the article will help you to perform metadata cleanup in the following……
 
Situation:

  1. After unsuccessful demote on a domain controller.
  2. Domain controller is down and passed tombstone limit.

Infrastructure Details:
Forest Name: NAKSHATRAIT.COM
Domain Name: NAKSHATRAIT.COM
Site Name: MySite1
Domain Controller (MySite1): DC1= NAKIT-RDC01,  DC2= NAKIT-ADC01
Perform metadata cleanup in Windows Server 2003

In Windows Server 2000/2003, you can use the Ntdsutil.exe utility to run metadata cleanup and manually remove the NTDS Settings object.

I

To clean up metadata

1. Logon on Main Domain Controller and Open the command line, type Ntdsutil and then press ENTER.

C:\WINDOWS>ntdsutil
ntdsutil:

2. At the Ntdsutil: prompt, type metadata cleanup and press Enter.

ntdsutil: metadata cleanup
metadata cleanup:

3. At the metadata cleanup: prompt, type connections and press Enter.

metadata cleanup: connections
server connections:

4. At the server connections: prompt, type connect to server <servername>, and Press Enter.
Note: <servername> is any functional domain controller in the same domain from which you plan to clean up the metadata of the failed domain controller.

server connections: connect to server NAKIT-RDC01
Binding to NAKIT-RDC01 ..
Connected to NAKIT-RDC01 using credentials of locally logged on user.
server connections:

Note: Windows Server 2003 Service Pack 1 eliminates the need for the above step.
5. Type quit and press Enter to return you to the metadata cleanup: prompt.

server connections: quit
metadata cleanup:

6. Type select operation target and press Enter.

metadata cleanup: Select operation target
select operation target:

7. Type list domains and press Enter. This lists all domains in the forest with a number associated
with each.

select operation target: list domains
Found 1 domain(s)
0 - DC=NAKSHATRAIT,DC=COM
select operation target:

8. Type select domain <number>, where <number> is the number corresponding to the domain
in which the failed server was located. Press Enter.

select operation target: Select domain 0
No current site
Domain - DC=NAKSHATRAIT,DC=COM
No current server
No current Naming Context
select operation target:

9. Type list sites and press Enter.

select operation target: List sites
Found 1 site(s)
0 - CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
select operation target:

10. Type select site <number>, where <number> refers to the number of the site in which
the domain controller was a member. Press Enter.

select operation target: Select site 0
Site - CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
Domain - DC=NAKSHATRAIT,DC=COM
No current server
No current Naming Context
select operation target:

11. Type list servers in site and press Enter. This will list all servers in that site with a corresponding number.

select operation target: List servers in site
Found 2 server(s)
0 - CN= NAKIT-RDC01,CN=Servers,CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
1 - CN= NAKIT-ADC01,CN=Servers,CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
select operation target:

12. Type select server <number> and press Enter, where <number> refers to the domain controller to be removed.

select operation target: Select server 0
Site - CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
Domain - DC= NAKSHATRAIT,DC=COM
Server - CN= NAKIT-ADC01,CN=Servers,CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
DSA object - CN=NTDS Settings,CN=NAKIT-ADC01,CN=Servers,CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM
DNS host name - NAKIT-ADC01.NAKSHATRAIT.COM
Computer object - CN=NAKIT-ADC01,OU=Domain Controllers,DC=NAKSHATRAIT,DC=COM
No current Naming Context
select operation target:

13. Type quit and press Enter.

select operation target: quit
metadata cleanup:

14. Type remove selected server and press Enter.
You will receive a warning message. Read it and press Yes.

metadata cleanup: Remove selected server
"CN=NAKIT-ADC01,CN=Servers,CN=MySite1,CN=Sites,CN=Configuration,DC=NAKSHATRAIT,DC=COM" removed from server "NAKIT-RDC01”
metadata cleanup:

15. Type quit, and press Enter until you return to the command prompt.

Perform metadata cleanup in Windows Server 2008/R2
You can use the below URL to perform the metadata cleanup on Windows Server 2008 Active directory domain controller.
http://technet.microsoft.com/en-us/library/cc736378(WS.10).aspx

Steps after Perform metadata cleanup in Windows Server

1. Make sure you have delete the Computer account from Active Directory User and Computer.
2. Make sure you have delete the Computer from Active Directory Site and Services.
3. Also delete any DNS record from NAME Server, Host (A) record.
4. Let the replication completely.

Leave a Reply

Your email address will not be published. Required fields are marked *