How to decommission AD Child Domain

< All Topics

Please refer to the following steps on how to decommission AD Child Domain

  • Root Domain =
  • Child Domain =
  • Domain Controller in Child Domain = child-dc01 & child-dc02
  • Users in child domain are using as their Email Address
  1. Disabled all Users’ Mailbox & Distribution Group from child domain in Exchange 2013 Server
#Define the DC running on Child Domain
$IGPT_DC = ""

#Disable Mailbox 
$Mailboxes = Get-Mailbox -DomainController $IGPT_DC   | ? PrimarySMTPAddress -Like "*" | Select Name, UserPrincipalName, Database

foreach ($Mailbox in $Mailboxes) {

   Disable-Mailbox -Identity $Mailbox.UserPrincipalName -DomainController $IGPT_DC -Confirm:$false


#Disable Distribution Group 
Get-DistributionGroup -DomainController $IGPT_DC | Disable-DistributionGroup -DomainController $IGPT_DC
  1. Run "netdom query fsmo"" on CHILD-DC01 to identify where is the PDC, RID pool manager and Infrastructure role
netdom query fsmo
    Schema master     
    Domain naming master
    RID pool manager  
    Infrastructure master
  1. Login to CHILD-DC02 and run "Test-ADDSDomainControllerUninstallation" to verify this DC can be demoted without any issue. Resolve the issue detected if any prior continue to step 4
#Test run to ensure that this DC can be demoted successfully
  1. Demote CHILD-DC02 with Uninstall-ADDSDomainController and server will reboot automatically once the operation is complete
#Demote DC 
LocalAdministratorPassword: ********
Confirm LocalAdministratorPassword: ********

The server will be automatically restarted when this operation is complete. The domain will no longer exist after you
uninstall Active Directory Domain Services from the last domain controller in the domain.
Do you want to continue with this operation?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
  1. Login to CHILD-DC01 which is the last DC in Child Domain, and run the following
#Verify there is no error 
Test-ADDSDomainControllerUninstallation -DemoteOperationMasterRole -LastDomainControllerInDomain -RemoveApplicationpartitions

#Decommission the last DC in Child Domain
Uninstall-ADDSDomainController -DemoteOperationMasterRole -LastDomainControllerInDomain -RemoveApplicationpartitions

The Child Domain was completed demoted and removed from Root Domain now.

Remove Exchange Mailbox Database

  1. Remove the Mailbox Database Copy in DAG Cluster from passive node and manually delete the LOG Folder & .edb file to free up disk space
Get-MailboxDatabaseCopyStatus * 

#Remove the mailbox database copy from the pasive node
Remove-MailboxDatabaseCopy -Identity IGPT\IB-MBX01  -Confirm:$False

WARNING: The copy of mailbox database "IGPT" on server "IB-MBX01" has been removed. 
If necessary, manually delete the database copy's files located at "L:\IGPT" and "M:\IGPT\IGPT.edb" on that server
  1. Remove the Mailbox Database from Active Node
#Remove the Mailbox Database from Active Node
Remove-MailboxDatabase -Identity IGPT 
Previous Deploy Wireless Network with Group Policy
Next How to delegate Password Reset right to User
Table of Contents