“To demote a domain controller
On a domain controller, click Start, and then click Run.
In Open, type dcpromo to open the Active Directory Installation Wizard, and then click Next.
On the Remove Active Directory page, click Next, and then continue to follow the wizard.
Before you complete this procedure, verify that this domain controller is not the only global catalog and that it does not hold an operations master role.”
Have a look at this Microsoft article: Demote a domain controller.