active directory users

Is their a process for finding out which active directory users have not had any activity for let's say 1 year?  I know I have many users in AD that are old and can be deleted.  How about a backup of AD before I start doing anything?
Who is Participating?
Lee W, MVPTechnology and Business Process AdvisorCommented:
In a command prompt on the DC, run:

dsquery user -inactive 52

Open in new window

Save the list.  Disable the users first.  If they don't complain in 3 months, delete.

(The number 52 is the number of weeks)
Ajit SinghCommented:
Step 1: Use Dsquery Command
Dsquery user –inactive X –limit 0

Step 2: Export the List of Inactive Users
Dsquery user –inactive X > C:\Folderyouwantthereportsin\inactive users.csv

Managing Inactive Active Directory Accounts Using PowerShell:

Hope this helps!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.