Demote Active Directory using PowerShell

Quick guide:

How to demote domain controller by Powershell commands:

The first step is to import module:

import-module ActiveDirectory

post-479-0-65049800-1413037750_thumb.jpg

Uninstall -ADDSDomainController -ForceRemoval -DemoteOperationMasterRole

 

post-479-0-75915300-1413037752_thumb.jpg

We have to confirm with Y and then the server will perform restart automatically
post-479-0-55957800-1413037754_thumb.jpg

 

post-479-0-16985800-1413037756_thumb.jpg

 

post-479-0-96209900-1413037792_thumb.jpg