Fun Directory Serivces Command Line
The domain admins where I work called me asking me to somehow identify and remove any workstations in the "Workstations" OU that might be mine. So I whipped up a "little" one liner. You will need to modify this if you want to use it for your own mystery workstation removal task. You'll also need the Server 2003 Resource Kit Tools.
for /f "usebackq tokens=*" %A in (`cmd /c "dsquery computer ou=workstations,dc=your,dc=domain,dc=org -name *"`) do (cmd /c "dsacls %A | qgrep -l your_account" && dsrm %A -noprompt -u yourdomain\your_account -p "removedformyviewingpleasure")

0 Comments:
Post a Comment
<< Home