Site Loader

Trying to demote a domain controller?

You can do that with the following command:


If the server is also a DNS server you will properly facing an issue

First you need to delete the DNS role

Uninstall-WindowsFeature DNS


Now you can try to remove the domain controller:

Uninstall-ADDSDomainController -LocalAdministratorPassword (convertto-securestring "***********" -asplaintext -force)

Perhaps this is the next error you will see.

 Run the following line. Maybe you need a reboot first.

Uninstall-ADDSDomainController -LocalAdministratorPassword (convertto-securestring "***********" -asplaintext -force) –IgnoreLastDCInDomainMismatch

Powershell recap

Uninstall-ADDSDomainController -LocalAdministratorPassword (convertto-securestring "***********"  -asplaintext –force)
Uninstall-WindowsFeature DNS
Uninstall-ADDSDomainController -LocalAdministratorPassword (convertto-securestring "***********"  -asplaintext -force) –IgnoreLastDCInDomainMismatch



Sander click to find out more