May 2019
Intermediate to advanced
620 pages
21h 41m
English
To graciously demote a domain controller, you can use the Uninstall-ADDSDomainController PowerShell cmdlet. The simplest script would look like that shown in the following example:
Import-Module ADDSDeploymentUninstall-ADDSDomainController
This will remove the domain controller from the Active Directory domain and prompt you for the new password for the built-in administrator account after demotion. Replace the values in the previous sample file with the values of your choice.
To remove the Active Directory Domain Services role, use the following PowerShell line:
Uninstall-WindowsFeature AD-Domain-Services -IncludeManagementTools
Read now
Unlock full access