Delete Failed Domain Controllers from Active Directory
This process will help you to remove a failed or otherwise unavailable domain controller that can no longer be demoted in a structured way. Where possible, demote the server in a supported manner, this is guide is for when a typical demotion is not possible for a variety of reasons, such as server crash or unresolvable replication problem.
Step 1. Remove Metadata via Active Directory Users & Computers
- Open
Active Directory Users and Computersas a Domain / Enterprise Administrator either on the Domain Controller directly, or from your management workstation - Expand the
Domains>Domain Controllerstree - Right click on the Domain controller you would like to remove
- Click Delete
- In the pop-up
Active Directory Domain Servicesconfirmation box, clickYes. - In the
Deleting Domain Controllerdialogue box, be sure to read and understand the warning, then check theDelete this Domain controller anywaycheckbox and clickDelete - If the domain controller holds any FSMO roles, click
OKto migrate them to another available domain controller
Step 2. Remote the Domain Controller from Active Directory Sites and Services
- Open
Active Directory Sites and Servicesas a Domain / Enterprise Administrator - Expand the site in which the Domain Controller exists
- Expand the
Serverstree under the site - Right click the server you would like to remove and click
Delete - Click
Yesto confirm
Step 3. Remove remaining metadata through ntdsutil
Open Command Prompt as a Domain Administrator / Enterprise Administrator
Type
ntdsutiland hitEnterC:\WINDOWS>ntdsutil
ntdsutil:Type
metadata cleanupand hitEnterntdsutil: metadata cleanup
metadata cleanup:Type
connectionsand hit Entermetadata cleanup: connections
server connections:Type
connect to server <servername>where<servername>is the name of any functional domain controller in the same domain as the failed domain controllerserver connections: connect to server svr-dc-01
Binding to svr-dc-01 ...
Connected to svr-dc-01 using credentials of locally logged on user.
server connections:Type
quitand pressEnterto return to the metadata cleanup promptserver connections: quit
metadata cleanup:Type
Select operation targetand hitEntermetadata cleanup: Select operation target
select operation target:Type
list domainsand hitEnter. This lists all the domains in the forest alongside an index number for eachselect operation target: list domains
Found 2 domain(s)
0 - DC=lab,DC=rootwire,DC=dev
1 - DC=tech,DC=lab,DC=rootwire,DC=dev
select operation target:Type
select domain <number>where<number>is the index number of the domain in which the failed server is locatedselect operation target: Select domain 1
No current site
Domain - DC=tech,DC=lab,DC=rootwire,DC=dev
No current server
No current Naming Context
select operation target:Type
list sitesand pressEnterselect operation target: List sites
Found 1 site(s)
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
1 - CN=Another-Site-Elsewhere,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
select operation target:Type
select site <number>where<number>is the index number of the site in which the failed server is locatedselect operation target: Select site 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
Domain - DC=tech,DC=lab,DC=rootwire,DC=dev
No current server
No current Naming Context
select operation target:Type
list servers in siteand hitEnter. This will list all the servers in the site alongside a corresponding index number.- If metadata was correctly cleared through
AD Users and Computers/AD Sites and Servicesin an earlier step, the domain controller may not appear here.
select operation target: List servers in site
Found 2 server(s)
0 - CN=svr-dc-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
1 - CN=svr-dc-01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
select operation target:- If metadata was correctly cleared through
Type
select server <number>where<number>is the index number of the server you want to removeselect operation target: Select server 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
Domain - DC=tech,DC=lab,DC=rootwire,DC=dev
Server - CN=svr-dc-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
DSA object - CN=NTDS Settings,CN=svr-dc-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev
DNS host name - svr-dc-02.tech.lab.rootwire.dev
Computer object - CN=svr-dc-02,OU=Domain Controllers,DC=tech,DC=lab,DC=rootwire,DC=dev
No current Naming Context
select operation target:Type
quitto return to themetadata cleanuppromptselect operation target: q
metadata cleanup:Type
remove selected serverand pressEnter- You will receive a warning message. Read and understand it. If you agree, click "Yes"
metadata cleanup: Remove selected server
"CN=svr-dc-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=tech,DC=lab,DC=rootwire,DC=dev" removed from server "svr-dc-01"
metadata cleanup:At this stage, if Active Directory indicates that the domain controller has been successfully removed, great! However, if an error stating that the object couldn't be located appears, it's possible that Active Directory has previously been deleted from the domain controller.
Step 4. Remove the server from DNS
- Open DNS Manager
- In the forward lookup zone for the domain, locate any records for the Domain controller and remove them
- Expand the tree under the forward lookup zone for the domain.
_msdcs>dc>_sites><Domain controller site>where<Domain controller site>is the site in which the Domain controller to be removed existed- Remove the
_kerberosand_ldaprecords corresponding to the removed domain controller.
- Remove the
- Expand the tree under the forward lookup zone for the domain.
_msdcs>dc>_tcp_and remove the_kerberosand_ldaprecords corresponding to the removed domain controller. - Expand the tree under the forward lookup zone for the domain.
_sites><Domain controller site>>_tcpwhere<Domain controller site>is the site in which the Domain controller to be removed existed- Remove the
_kerberosand_ldaprecords corresponding to the removed domain controller.
- Remove the
- Expand the tree under the forward lookup zone for the domain.
_tcp- Remove the
_kerberos,_kpasswdand_ldaprecords corresponding to the removed domain controller
- Remove the
- Expand the tree under the forward lookup zone for the domain.
_udp- Remove the
_kerberos,_kpasswdand_ldaprecords corresponding to the removed domain controller
- Remove the
- Expand the tree under the forward lookup zone for the domain.
DomainDnsZones- Remove the IP address relating to the removed domain controller
- Expand the tree under the forward lookup zone for the domain.
DomainDnsZones>_tcp- Remove the
_ldaprecords corresponding to the removed domain controller
- Remove the
- Expand the tree under the forward lookup zone for the domain.
DomainDnsZones>_sites><Domain controller site>>_tcpwhere<Domain controller site>is the site in which the Domain controller to be removed existed- Remove the
_ldaprecords corresponding to the removed domain controller
- Remove the