Today I had (again...) to lobotomize a domain controller which had suffered the dreaded USN rollback; the standard solution to this issue is to demote it and then promote it back again, but the main problem is, the demote isn't going to work, because the USN rollback condition prevents any replication from happening, thus not allowing the DC being demoted to perform its final replication and die gracefully. Usually, you end up shutting down the server, removing any reference to it from Active Directory, and then reinstalling Windows from scratch.
However, you might have other software or data on that server; or, you may just not want to completely rebuild it, if a demote could suffice.
So, my question is: how can I successfully demote a domain controller which has suffered a USN rollback?
What I tried:
I isolated the server from the network, launched the demote process and, when asked, told it it was the last DC in the domain; but it still complained about this not being true.
So I removed all other DCs from its copy of the Active Directory, and then did the same as above; but even this failed again, with an error about being unable to replicate a directory partition (to who? It was supposed to be the only DC around!).