To force removal of AD DS from a domain controller
Click Start, click Run, type the following command, and then press ENTER: Dcpromo /forceremoval
If the domain controller hosts any operations master (also known as flexible single master operations or FSMO) roles or if it is a Domain Name System (DNS) server or a global catalog server, warnings appear that explain how the forced removal will affect the rest of the environment. After you read each warning, click Yes. To suppress the warnings in advance of the removal operation, type /demotefsmo:yes at the command prompt. If you forcefully removal AD DS from a server that hosts an operations master role, you must seize the role after the Dcpromo operation. For information about seizing an operations master role, see Seizing an operations master role.
On the Welcome to the Active Directory Domain Services Installation Wizard page, click Next.
On the Force the Removal of Active Directory Domain Services page, review the information about forcing the removal of AD DS and metadata cleanup requirements, and then click Next.
On the Administrator Password page, type and confirm a secure password for the local Administrator account, and then click Next.
On the Summary page, review your selections. Click Back to change any selections, if necessary.
To save the settings that you selected to an answer file that you can use to automate subsequent AD DS operations, click Export settings. Type a name for your answer file, and then click Save.
When you are sure that your selections are accurate, click Next to remove AD DS.
You can select Reboot on completion to have the server restart automatically, or you can restart the server to complete the AD DS removal when you are prompted to do so.