Полезное‎ > ‎CMD‎ > ‎



Delete objects from active directory.

      DSRM ObjectDN [-subtree [-exclude]] [-noprompt]
            [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]
               [-c] [-q] [{-uc | -uco | -uci}]
   ObjectDN  Distinguished name of the group that you want to remove.
             If omitted will be taken from standard input (stdin)
   -subtree  Delete the object and all objects contained in its subtree.
   -exclude  Delete all objects contained in the subtree, but not the object itself.
   -noprompt Do not prompt to confirm deletion.
   -s Server Connect to a remote server/domain, default=%logonserver% domain controller.
   -c        Continue with the next object after any error (when you specify multiple target objects)
by default dsrm will exit when the first error occurs. -q Quiet, suppress all output -uc Unicode format -uco Unicode format for output only -uci Unicode format for input only

DS* commands are available on networked machines with the server role A.D. Domain Services installed, Domain Controllers (or for XP users: XP Professional).


Remove all objects under the OU AcmeCo, but leave the OU intact:

C:\> dsrm -subtree -exclude -noprompt -c "OU=AcmeCo,DC=ss64,DC=Com"

“If future generations are to remember us with gratitude rather than contempt, we must leave them more than the miracles of technology. We must leave them a glimpse of the world as it was in the beginning, not just after we got through with it” - President Lyndon B. Johnson


DSAdd - Add object
DSMod - Modify object
DSGet - Display object 
DSMove - Move object
DSQuery - Search for objects 
DSRM - Delete object
CSVDE - Import or export AD info in CSV format.
LDIFDE - Edit AD Objects, extend schema, import or export AD information. 
Q322684 - Directory Service Command-Line Tools