Site Loader

Trying to demote a domain controller?

You can do that with the following command:

Uninstall-ADDSDomainController

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

Reboot

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)
#error
Uninstall-WindowsFeature DNS
#reboot
Uninstall-ADDSDomainController -LocalAdministratorPassword (convertto-securestring "***********"  -asplaintext -force) –IgnoreLastDCInDomainMismatch

 

 

Sander

https://cubik.com.tw/ click to find out more