I don’t think it’s widely known, but when you aren’t able to normally demote a domain controller in Active Directory and have to perform a metadata cleanup, it’s become much easier if you’re running Windows 2008 or R2 .
The classic method for cleaning up the DC’s metadata in Active Directory has been to go into NTDSUTIL and run through a sequence of commands to point at the right computer object representing the domain controller, then removing it. In Windows 2008 or R2
…you can use Active Directory Users and Computers to clean up server metadata. In this procedure, deleting the computer object in the Domain Controllers organizational unit (OU) initiates the cleanup process, which proceeds automatically.
Simple! Just delete the computer object! This has been recently documented in this TechNet article.
Follow Sean on Twitter at @shorinsean.