Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ...
  2. -inactive <NumWeeks> Finds users that have been inactive
  3. (not logged on) for at least <NumWeeks>
  4. number of weeks.
  5. ...
  6.  
  7. for /f "Tokens=*" %%s in ('dsquery computer -inactive 5 -limit 0') do (
  8. DSMOVE %%s -newparent "OU=Computers,OU=Quarantine,OU=MyOu,DC=MyDomain,DC=local"
  9. )
  10.  
  11. for /f "Tokens=*" %%s in ('dsquery user -inactive 5 -limit 0') do (
  12. DSMOVE %%s -newparent "OU=Users,OU=Quarantine,OU=MyOu,DC=MyDomain,DC=local"
  13. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement