Unable To Delete Computer Using DSRM (Remove Computer Example)

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.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Leave a comment

Your email address will not be published. Required fields are marked *