DSRM can be used to delete computer account objects from AD, but there’s a trick to using it. If you find that DSRM doesn’t remove computer accounts, you need to use the –noprompt switch on the end of your DSRM computer command. For some reason, when removing a computer account object, DSRM doesn’t prompt for the delete and automatically fails.
Here’s a DSRM example showing how to remove a computer called PC1:
dsquery computer -name “PC1” | dsrm -noprompt
As you can see, the results of the DSQUERY command searching for the computer name are piped into the DSRM command and the computer account object is removed.