Introduction

If you want to completely remove a child domain and its domain controller that was no longer active or orphaned due to some reasons, you can follow the following steps. Be carefull and follow the steps, and remember that the child domain controller server which is already removed is probibited to be turn of until you remove the ADCS role or reinstall the server.

Steps

You will need to remove the child domain controllers first, and then proceed to remove the child domain from your forest. Once done, you need to manually remove the computer object from the Active Directory Sites and Services and ADUC

Removing the child domain controllers from your forest.

  • Run command prompt as Administartor, type ntdsutil, and then press Enter.
  • Type metadata cleanup, and then press Enter.
  • Type connections, and then press Enter.
  • Type connect to server <servername>, where is the name of the domain controller that holds the Domain Naming Master FSMO Role.
  • Type quit, and then press Enter. The Metadata Cleanup menu is displayed.
  • Type select operation target, and then press Enter.
  • Type list sites, and then press Enter. A list of sites in the forest is displayed, each with an associated number.
  • Type select site <number>, and then press Enter, where number is the number associated with the site that contains the domain to be removed.
  • Type list domains in site, and then press Enter. A list of domains in the site is displayed, each with an associated number.
  • Type select domain <number>, and then press Enter, where number is the number associated with the domain to be removed.
  • Type list servers for domain in site, and then press Enter. A list of domain controllers in the domain is displayed, each with an associated number.
  • Type select server <number>, and then press Enter, where number is the number associated with the domain controller to be removed.
  • Type quit, and then press Enter. The Metadata Cleanup menu is displayed.
  • Type remove selected server, and then press Enter. You should receive confirmation that the removal was successful.
  • Type quit at each menu to quit the NTDSUTIL tool. You should receive confirmation that the connection disconnected successfully.

Removing the child domain from your forest.

  • Run command prompt as Administartor, type ntdsutil, and then press Enter.
  • Type metadata cleanup, and then press Enter.
  • Type connections, and then press Enter.
  • Type connect to server <servername>, where is the name of the domain controller that holds the Domain Naming Master FSMO Role. Then press Enter. You should receive confirmation that the connection is successfully established.
  • Type quit, and then press Enter. The Metadata Cleanup menu is displayed.
  • Type select operation target, and then press Enter.
  • Type list domains, and then press Enter. A list of domains in the forest is displayed, each with an associated number.
  • Type select domain <number>, and then press Enter, where number is the number associated with the domain to be removed.
  • Type quit, and then press Enter. The Metadata Cleanup menu is displayed.
  • Type remove selected domain, and then press Enter. You should receive confirmation that the removal was successful. If an error occurs, see the Microsoft Knowledge Base for articles on specific error messages.
  • Type quit at each menu to quit the NTDSUTIL tool. You should receive confirmation that the connection disconnected successfully.

Clean up the AD objects.

  • Open the Active Directory Sites and Services console (dssite.msc) and remove the domain controllers of the domain to be removed from their site, manually.
  • Open the Active Directory Domains and Trusts console (domain.msc) and remove all trust relationships to the domain to be deleted from all other domains.
  • Remove all entries in DNS related to the domain to be removed, also the SRV records.