How to Perform metadata cleanup in Active Directory

         Perform metadata cleanup in Active directory

Why We need to Perform Metadata cleanup

->when we want to decommission a DC and are unable to demote a Dc using DCPROMO and we used the command DCPROMO /Forevermore then some data related to that DC will  not cleared from Active Directory like DNS,site link  and we need to manually delete that data.
Then we need to perform metadata cleanup in AD using below steps.

-> open cmd (start->run->cmd enter)
-> type ntdsutil enter (below Figure)
ntdsutil command

->Type Metadata Cleanup Enter
->Type Connections Enter
->Type Connect to server DC2 (server name) Enter
->Type Quit Enter
->Type Select operation target Enter
->Type " list Domains" Enter (it will show you all the domains in Forest)
->Type "select domain 0 " Enter (where you have to select your domain from list like 0,1,2)
->Type "Select List sites" Enter (it will list all the sites in domain)
->Type "select site 1 " Enter  (where 1 is the name of site where we have failed DC)
->Type "list servers in site" Enter (it will list all the servers in site)
->Type select server 0 Enter (Enter 0,1,2 to select failed server in site)
Please see below figure for above steps.
metadata cleanup using ntdsutil

->Now Type Quit and Enter
->Now Type Remove selected server
->Type Quit to Exit from Ntdsutil

=> Now We have to delete server manually from active directory site and services.
->now go to sites ->then servers->and then select the faulty server and right click ->delete

delete server from sites in ad

=>Now We require to manually remove the serves from DNS list to delete the servers DNS Entry.

->open DNS manager ->we can connect to our main domain controller (eg- DC1).
->open Forward Lookup zone->right click on ->select name server and remove the faulty DC from list.
->Now Right click on (domain ) and ->right click ->select name server and remove the faulty DC from list.

remove name server from dns

=>now we have to clean every records from DNS as shown in below figure.

metadata cleanup

->As we can see in above figure, we are removing sites recored from dns(dns->dc->forward lookup zone->>dc->second->_tcp->_ldap->-kerberos->all the record we need to delete
then we require to clear from all the above options and clear all the srv records.

No comments:

Post a Comment

Quotes About Love