This article describes how to remove data in Active Directory due to an unsuccessful domain controller (DC) demotion via DCPROMO or simply because you have a DC that failed and you are unable to restart it to properly demote it to a member server.
If you attempted to demote the DC using DCPROMO, as part of the demotion process, the configuration data is removed for the domain controller from Active Directory. This data is in the form of an NTDS Settings object that exists as a child of the server object in Active Directory Sites and Services.
The information is in the following location in Active Directory:
CN=NTDS Settings,CN=SERVERNAME,CN=Servers,CN=SITENAME,CN=Sites,CN=Configuration,DC=DOMAIN
- Removes the
NTDSAorNTDS Settingsubject. - Removes inbound AD connection objects that existing destination DCs use to replicate from the source DC being deleted.
- Removes the computer account.
- Removes
FRS memberobject. - Removes
FRS subscriberobjects. - Tries to seize flexible single operations master roles (also known as flexible single master operations or FSMO) held by the DC that are being removed.
To begin the cleanup process click Start, point to Programs, point to Accessories, and then click Command Prompt. Run as an Enterprise Admin.
- At the command prompt, type
ntdsutil, and then press ENTER. - Type
metadata cleanup, and then press ENTER. - Type
connectionsand press ENTER. - Type
connect to server servername, and then press ENTER. - Type
quit, and then press ENTER. - Type
select operation targetand press ENTER. - Type
list domainsand press ENTER. - Type
select domain numberand press ENTER. - Type
list sitesand press ENTER. - Type
select site numberand press ENTER. - Type
list servers in siteand press ENTER. - Type
select server number. - Type
quitand press ENTER. - Type
remove selected serverand press ENTER. - Type
quit, and then press ENTER at each menu quit the Ntdsutil utility.
You should receive confirmation that the removal was completed successfully. If you receive the error message, “The DSA object could not be found”, the NTDS Settings object may already be removed from Active Directory as the result of another administrator removing the NTDS Settings object or replication of the successful removal of the object after running the DCPROMO utility.
You may also see this error when you try to bind to the domain controller that will be removed. Ntdsutil has to bind to a domain controller other than the one that will be removed with metadata cleanup.
Additional Steps for pre-Windows 2003 SP1, but should be verified in all versions. Use ADSIEdit to delete the computer account. To do this, follow these steps:
- Click Start, click Run, type
adsiedit.mscin the Open box, and then click OK. - Expand the Domain NC container.
- Expand
DC=domain name, DC=ext. - Expand
OU=Domain Controllers. - Right-click
CN=domain controllername, and then click Delete.
Additional Steps for pre-Windows 2003 SP1, but should be verified in all versions. Use ADSIEdit to delete the FRS member object.
- Click Start, click Run, type
adsiedit.mscin the Open box, and then click OK. - Expand the Domain NC container.
- Expand
DC=domain name, DC=ext. - Expand
CN=System. - Expand
CN=File Replication Service. - Expand
CN=Domain System Volume (SYSVOL share). - Right-click the domain controller you are removing, and then click Delete.
Additional cleanup steps to perform… Windows 200x
- Remove the cname record in the
_msdcs.rootdomain of forest zone in DNS. - As best practice, you should delete the host name and other associated DNS records.
- Delete the cname record in the
_msdcscontainer. - If this is a DNS server, remove the reference to this DC under the Name Servers tab.
- If you have reverse lookup zones, also remove the server from these zones.
If the deleted computer is the last domain controller in a child domain, and the child domain was also deleted, use ADSIEdit to delete the trustDomain object for the child. To do this, follow these steps:
- Click Start, click Run, type
adsiedit.msc, and then click OK. - Expand the Domain NC container.
- Expand
DC=domain name, DC=ext. - Expand
CN=System. - Right-click the Trust Domain object, and then click Delete.
- Use Active Directory Sites and Services to remove the domain controller.
- Start Active Directory Sites and Services.
- Expand Sites.
- Expand the server’s site.
- Expand Server.
- Right-click the domain controller, and then click Delete.











