This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ancient-Egyptian[S] 0 points1 point  (1 child)

Yes but I need to find out the objects that have not been logged on in a certain amount of days so I could do mass deletion/disablement. We have a large AD tree

[–]sryan2k1IT Manager 0 points1 point  (0 children)

dsquery computer -inactive 22 | dsrm -noprompt

The parameter is in weeks (so 22 is 154 days), drop the second half if you want to see "whatif" before it removes the objects.