Removing a non-existent domain

Recently lost a huge storage array and with that the DC for a demo child domain. I therefore had to clean up the now non-existent domain. I did this with ntdsutil. Below are the steps involved. Basically the domain controllers for the domain are removed, then the DNS naming context and finally the domain.

C:UsersAdministrator>ntdsutil
ntdsutil: metadata cleanup
metadata cleanup: connections
server connections: connect to server savdaldc01
Binding to savdaldc01 ...
Connected to savdaldc01 using credentials of locally logged on user.
server connections: quit
metadata cleanup: select operation target
select operation target: list sites
Found 5 site(s)
0 - CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
1 - CN=Azure,CN=Sites,CN=Configuration,DC=savilltech,DC=net
2 - CN=Houston,CN=Sites,CN=Configuration,DC=savilltech,DC=net
3 - CN=Austin,CN=Sites,CN=Configuration,DC=savilltech,DC=net
4 - CN=SanAntonio,CN=Sites,CN=Configuration,DC=savilltech,DC=net
select operation target: select site 0
Site - CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
Domain - DC=dev,DC=savilltech,DC=net
No current server
No current Naming Context
select operation target: list servers in site
Found 2 server(s)
0 - CN=SAVDALDC01,CN=Servers,CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
1 - CN=SAVDALDEVDC01,CN=Servers,CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
select operation target: select server 1
Site - CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
Domain - DC=dev,DC=savilltech,DC=net
Server - CN=SAVDALDEVDC01,CN=Servers,CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
        DSA object - CN=NTDS Settings,CN=SAVDALDEVDC01,CN=Servers,CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net
        DNS host name - savdaldevdc01.dev.savilltech.net
        Computer object - CN=SAVDALDEVDC01,OU=Domain Controllers,DC=dev,DC=savilltech,DC=net
No current Naming Context
select operation target: quit
metadata cleanup: remove selected server
Transferring / Seizing FSMO roles off the selected server.
Unable to determine FRS owner for role PDC.
Unable to determine FRS owner for role Rid Master.
Unable to determine FRS owner for role Infrastructure Master.
"CN=SAVDALDEVDC01,CN=Servers,CN=Dallas,CN=Sites,CN=Configuration,DC=savilltech,DC=net" removed from server "savdaldc01"


metadata cleanup: select operation target
select operation target: list naming contexts
Found 7 Naming Context(s)
0 - CN=Configuration,DC=savilltech,DC=net
1 - DC=savilltech,DC=net
2 - CN=Schema,CN=Configuration,DC=savilltech,DC=net
3 - DC=DomainDnsZones,DC=savilltech,DC=net
4 - DC=ForestDnsZones,DC=savilltech,DC=net
5 - DC=dev,DC=savilltech,DC=net
6 - DC=DomainDnsZones,DC=dev,DC=savilltech,DC=net
select operation target: select naming context 6
No current site
Domain - DC=dev,DC=savilltech,DC=net
No current server
Naming Context - DC=DomainDnsZones,DC=dev,DC=savilltech,DC=net
select operation target: quit
metadata cleanup: remove selected naming context
"DC=DomainDnsZones,DC=dev,DC=savilltech,DC=net" removed from server "savdaldc01"


metadata cleanup: select operation target
select operation target: list domains
Found 2 domain(s)
0 - DC=savilltech,DC=net
1 - DC=dev,DC=savilltech,DC=net
select operation target: select domain 1
No current site
Domain - DC=dev,DC=savilltech,DC=net
No current server
Naming Context - DC=DomainDnsZones,DC=dev,DC=savilltech,DC=net
select operation target: quit
metadata cleanup: remove selected domain
"DC=dev,DC=savilltech,DC=net" removed from server "savdaldc01"
metadata cleanup: quit
ntdsutil: quit

Note that if you receive an error that the domain cannot be remove because of a leaf object run the following to force replication.

repadmin /syncall /aped

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: