active directory users

mkramer777 used Ask the Experts™
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?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technology and Business Process Advisor
Most Valuable Expert 2013
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)
E ATech Lead

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!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial