Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/future4tech/public_html/wp-includes/functions.php on line 6114
DSRM.exe – Windows CMD Command - Future4Tech

DSRM.exe – Windows CMD Command

Delete objects from active directory.

Syntax
      DSRM ObjectDN [-subtree [-exclude]] [-noprompt]
            [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]
               [-c] [-q] [{-uc | -uco | -uci}]

Key
   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
Examples

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

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

Find all the computer objects that have been inactive in AD for the last 52 weeks and remove them:

C:\> dsquery computer -inactive 52 | dsrm -noprompt

You may also like...

2 Responses

  1. zortilo nrel says:

    You have brought up a very superb details , appreciate it for the post.

  2. frolep rotrem says:

    I really like your writing style, good information, regards for posting : D.

Leave a Reply

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


Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/future4tech/public_html/wp-includes/functions.php on line 5464