I'm having the same problem when trying to remove a 2008R2 DC from the domain (all the other DC's are samba4). dcpromo didn't work, and trying to remove it using users and computers results in
"Windows cannot delete object"
LDAP://hostname/CN=ARQUIVOS,OU=Domain Controllers,DC=contoso,DC=com,DC=br because:
The specified module could not be found.
It seem impossible to do the metadata cleanup, due to the same reason as John Taylor indicated:
metadata cleanup: Select operation target
select operation target: list domain
Error parsing Input - Invalid Syntax.