This article will show you how to demote a domain controller. The steps are the same for Windows Server 2012 R2 or Windows Server 2016.
To begin open the server manager and select Remove Roles and Features.

- Click next a couple of times until you get to the server roles tab
- Uncheck the “Active Directory Domain Services” role

- You will get a prompt to remove the features

- You will get the validation prompt below. Click on Demote this domain controller

- Now will see the Active Directory Domain Services Configuration Wizard. Confirm that you have the correct credentials and click Next

- Check the Proceed with removal box and click Next

- You may get this next prompt to Remove DNS delegation. If that is the case supply the proper credentials and click next.

- Enter a new password for the local administrator account and click Next

- Confirm the selections and click Demote

The server will reboot and come back up as a domain-joined server. Now you can proceed with removing the Active Directory role and repropose or decommission the server.