This command will pipe all the accounts it finds that have not logged in for 10 weeks to file c:users.txt – dsquery computer dc=domain,dc=local -inactive 10 -limit 0 >c:users.txt
Same as command above but it just displays it in CMD prompt – dsquery computer dc=domain,dc=local -inactive 10 -limit 0
This command will find the computer accounts and also delete them – dsquery computer dc=domain,dc=local -inactive 10 -limit 0 | dsrm