Thursday, 13 December 2018

How to perform Metadata cleanup of decommissioned Active Directory server?

Or, Metadata cleanup of deleted domian controller server
Or, Metadata cleanup of force-decomissioned domain controller server

Descriptions: If you are looking for the step by step help to clean up Active Directory Metadata after force decommissioning your ADC server, this article is for you. Friends, it's always better to decommission ADC server gently and by fixing all issues popping up while performing decommission, but sometimes you end up with taking quick decision to go ahead and force decommission the non-production or outdated ADC server.

Scenario: I have recently force-decommissioned my ADC server because it was failing for unknown multiple reasons while performing normal decommission from server manager console.

Environment Details
Server OS: Windows Server 2012 and Windows Server 2012 R2
Server Role: ADC
Status of AD Role: Removed using server manager console
Deleted AD Server Name: DELETEDADSRV01
Live AD Server Name: LIVEADSRV01

Precautions
1. Do not delete computer object, containers, or site and service entries manually
2. Make sure you have basic knowledge of CMD interface and understanding of reading the selection appearing while executing the commands for metadata cleanup
3. Make sure you have enough privileged account to perform metadata cleanup (preferably Enterprise Admin or Domain Admin)
4. Remove the check mark from ‘Protect Object From Accidental Deletion’ on the Deleted AD Computer Object, NTDS Settings, and relevant site’s containers

Steps:
Login to any working available Domain Controller Server > Open CMD (Run as Administrator) > Execute the command in sequence as explained and screenshot given below:

>ntdsutil
>Metadata cleanup
>connections
>connect to server LiveADServer01 (replace ‘LiveADServer’ with your any real live AD server name)
>quit
>select operation target
>list site
>select site 0 (if you have multiple sites, select it carefully, where your deleted AD server exist)
>list domains in site
>select domain 0 (if you have multiple domains, select it carefully, where your deleted AD server exist)
>list servers in site (you would be able to see your deleted AD server name in the list here)
>select server 0 (select your deleted AD server’s number carefully)
>remove selected server










Once you execute the last command ‘Remove Selected Server’, you would be getting a pop-up message like shown below. Read the message carefully and proceed further by clicking on ‘Yes’ only if you agree and sure about the action and result.













Once the deletion process is completed, type quite on the CMD prompt to exist the metadata clean-up interface.

Cheers, Hope it helps you…
If you have any query and feedback, Please write me back.

No comments:

Post a comment