Demoting domain controllers and removing domains

At the beginning of this chapter, you saw how to create a new domain (or forest) using PowerShell and also learned how to add new domain controllers to existing domain. Just as we automated this domain or domain controller provision process with the help of cmdlets in the ADDSDeploy PowerShell module, we can perform demotion of domain controllers and domains using the cmdlets available in this module.

The cmdlet used for this purpose is Uninstall-ADDSDomainController. Using this, we can demote a domain controller alone or the domain (or forest) itself. There is another cmdlet called Test-ADDSDomainControllerUninstallation, that helps in verifying prerequisites for uninstalling a domain controller. ...

Get Active Directory with PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.