ads_remove
Removing Active Directory (AD) from Windows Server 2012 is a two-step process. In earlier versions, you might have used the dcpromo command, but in 2012 and later, this is done through Server Manager.
First, you must demote the server from being a Domain Controller (DC), and then you can remove the AD DS role entirely.
Step 1: Demote the Domain Controller
Before removing the software, the server needs to stop acting as a "controller" for your domain.
- Open Server Manager.
- Click Manage in the top-right corner and select Remove Roles and Features.
- Click Next until you reach the Server Roles page.
- Uncheck the box for Active Directory Domain Services.
- A validation window will pop up stating that the DC must be demoted first. Click the link that says Demote this domain controller.
-
The AD DS Configuration Wizard will open:
- Credentials: Provide the necessary administrator credentials.
- Force Removal: Only check "Force the removal of this domain controller" if the server cannot reach other DCs or if you are removing the very last DC in the domain.
- New Password: Enter a new password for the Local Administrator account. (Since the server will no longer use domain accounts, you need a local one).
.
- Review the options and click Demote. The server will automatically restart.