dsrm | new in WS2003 |
Deletes objects from Active Directory.
dsrm ObjectDN... [-subtree [-exclude]] [-noprompt] [{-s Server -d Domain }] [-u UserName ] [-p { Password *}] [-c] [-q]
The distinguished names of objects to remove from Active Directory.
Deletes the specified object and all its children. If -exclude is used, all children are deleted, but the parent isn't.
Doesn't prompt for confirmation of each deletion.
Connects to a specified server or domain to run the command (if omitted, defaults to domain controller in logon domain).
Credentials for running the command. Specify UserName as domain\ user or user@domain . If -p * , prompts for password.
Reports errors and then continues with next object in argument list if multiple objects are specified; otherwise , exits upon error.
Runs in quiet mode to suppress standard output of command.
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
Active Directory , dsadd , dsget , dsmod , dsmove , dsquery , Groups , Users