If the demotion failed, you can try the brute force approach:

1. Use Regedt32 to navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions

2. Edit the ProductType value name and change the data value from LanmanNT to ServerNT, using the exact case.

3. Shutdown and restart the server.

4. Delete the NTDS folder.