Book Image

Active Directory with PowerShell

By : Pamarthi Venkata Sitaram, YELLAPRAGADA U PADMAVATHI
5 (1)
Book Image

Active Directory with PowerShell

5 (1)
By: Pamarthi Venkata Sitaram, YELLAPRAGADA U PADMAVATHI

Overview of this book

Table of Contents (16 chapters)
Active Directory with PowerShell
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.

When you demote a Windows Server 2012 domain controller manually, you will be prompted with several options that are essential for demotion functionality and later. Following are some of the important parameters that you should understand and have...