Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- -inactive <NumWeeks> Finds users that have been inactive
- (not logged on) for at least <NumWeeks>
- number of weeks.
- ...
- for /f "Tokens=*" %%s in ('dsquery computer -inactive 5 -limit 0') do (
- DSMOVE %%s -newparent "OU=Computers,OU=Quarantine,OU=MyOu,DC=MyDomain,DC=local"
- )
- for /f "Tokens=*" %%s in ('dsquery user -inactive 5 -limit 0') do (
- DSMOVE %%s -newparent "OU=Users,OU=Quarantine,OU=MyOu,DC=MyDomain,DC=local"
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement