dsrm | new in WS2003 |
from Active Directory.
Syntax
dsrm ObjectDN... [-subtree [-exclude]] [-noprompt] [{-s Server|-d Domain}]
[-u UserName] [-p {Password|*}] [-c] [-q]
Options
- ObjectDN...
The distinguished names of objects to remove from Active Directory.- -subtree [-exclude]
Deletes the specified object and all its children. If
-exclude is used, all children are deleted, but
the parent isn't.- -noprompt
Doesn't prompt for confirmation of each deletion.- {-s Server | -d Domain}
Connects to a specified server or domain to run the command (if
omitted, defaults to domain controller in logon domain).- [-u UserName] [-p {Password | *}]
Credentials for running the command. Specify
UserName as
domain\user or
user@domain. If -p *,
prompts for password.- -c
Reports errors and then continues with next object in argument list
if multiple objects are specified; otherwise, exits upon error.- -q
Runs in quiet mode to suppress standard output of command.
Examples
Delete the child objects within the Customer Support OU in the
mtit.local domain:
dsrm "OU=Customer Support,DC=mtit,DC=local" -subtree -exclude
Are you sure you wish to delete all children of OU=Customer Support,DC=mtit,
DC=local (Y/N)? y
dsrm succeeded:OU=Customer Support,DC=mtit,DC=local
See Also
Active Directory , dsadd,
dsget, dsmod,
dsmove, dsquery,
Groups , Users