In this article, we will explore how to uninstall active directory domain controller in Windows Server 2012 (AD DS). These steps cover procedures on how to remove Active Directory Domain Services (AD DS). In Windows Server 2012, we will use PowerShell or Server Manager to demote the domain controller. Follow this article to get more information.
Table of Contents
To Uninstall Active Directory from AD DS Complete the Following Steps
Log in to your Server 2012 R2 with the domain administrator.
Run PowerShell and then copy/paste the below command.
Uninstall-ADDSDomainController -DemoteOperationMasterRole –RemoveApplicationPartition
Enter local administrator credentials, confirm credentials, and then hit enter.
Type Y and then hit enter. to uninstall the active directory.

It will complete the process in a few minutes.

The server will be restarted automatically.

Demote Domain Controller Server 2012
How to demote an active directory domain service from Windows Server 2012 R2.
Log in with the local administrator.

Remove roles and features wizard, On the Before You Begin page, choose next.

On the Select Destination Server window, choose the desired server from the Server Pool and then click Next.

On the Remove Roles and Features Wizard page, deselect the box “Active Directory Domain Services” to remove the active directory from Windows Server 2012.

Select Remove Features.

Now deselect the DNS Server role.

Choose Remove Features.

Select Next

Choose Next.

Confirm the active directory removal selections, and then click on the Remove button to remove the active directory domain controller.

Click Close, and your computer will restart automatically.

Join Windows Server 2012 to Workgroup
After restarting the server, please join the Windows server in the workgroup.
In the server manager, click on the local server interface, and then click on domain.

For system properties, click on change.

Select workgroup, type workgroup, and then click OK.

Click ok

Click ok

Select OK to restart the computer.

Click OK to continue.

Click on the Restart Now button to complete the process.
