Easy Step-by-Step guide to demote a domain controller using PowerShell for Server 2012 and above

This article is for you if –

  • You wish to demote a domain controller
  • You need to find out about demoting a domain controller
  • You wish to demote your domain domain controller to a member server
  • This is the last member server in your domain and you no longer need the domain
  • You have promoted a new domain controller and need to decommission this one
  • You are following the Renaming a domain controller guide and wish to demote this domain controller before renaming the new one

Now lets demote a domain controller…

The procedure can be performed using two AD PowerShell cmdlets. Open a PowerShell Admin prompt and run the command as shown below.

1
Uninstall-ADDSDomainController

Other parameters can be added to Uninstall-ADDSDomainController to reflect the options that are available in the Active Directory Domain Services Configuration Wizard.

1
Uninstall-ADDSDomainController -Credential (Get-Credential) -ForceRemoval

For a full list of available parameters, use Get-Help Uninstall-ADDSDomainController.

Once the server has been demoted and rebooted, run Uninstall-WindowsFeature to remove the ADDS server role:

1
Uninstall-WindowsFeature AD-Domain-Services -IncludeManagementTools

If you try to remove ADDS before demoting the domain controller, PowerShell will return an error.

If you found this article helpful, would you consider buying me a Coffee?