Fast – Inactive AD Computers List

One of easiest ways to get a current list of all the inactive Computers in your AD is by using DSQuery. Below you will find two examples of how I use this. You will notice the “-limit 0”. This allows the query to pull back an unlimited amount of computers. At the end I am piping this out to a csv file.

Computer accounts not used in the last 6 months/26 weeks.
dsquery computer -inactive 26 -limit 0 > List_6_months.csv

Computer accounts not used in the last 2 months/8 weeks.
dsquery computer -inactive 8 -limit 0 > List_2_Months.csv

Leave a Reply

Your email address will not be published. Required fields are marked *