Solved

How Do I Find A List Of Users Who Have Not Logged On In X Number Of Days?

Posted on 2011-02-14
3
607 Views
Last Modified: 2012-05-11
How Do I Find A List Of Users Who Have Not Logged On In X Number Of Days? We use Active Direcotry and I would like to clean old user accounts. Something wwhich exports results to a txt file would be helpful.
0
Comment
Question by:achesterman08
3 Comments
 
LVL 70

Assisted Solution

by:Chris Dent
Chris Dent earned 167 total points
ID: 34887249

Perhaps the simplest option would be this:

dsquery user -inactive 8 -limit 0

The inactive interval is measured in weeks here, not days.

Otherwise, OldCmp is a golden-oldie :)

http://www.joeware.net/freetools/tools/oldcmp/index.htm

The name suggests it's for computers, but it works just as well for users. It'll produce reports in a number of different formats :)

Chris
0
 
LVL 5

Accepted Solution

by:
NotVeryFat earned 167 total points
ID: 34887251
In Active Directory, right click 'Saved Queries', then New -> New Query.

Give it a name and select the root you wish to query, click 'Define Query' and select Users tab, then select 'Days Since last logon'.

Then, when it's run, right click the completed query and export to csv or whatever you want.
0
 
LVL 39

Assisted Solution

by:Krzysztof Pytko
Krzysztof Pytko earned 166 total points
ID: 34887255
on a DC in a command-line type:

dsquery user -inactive <NumberOfWeeks> -limit 0 | dsget user -fn -ln -samid >>C:\inactive_users.txt

where <NumberOfWeeks> is integer number

Regards,
Krzysztof
0

Join & Write a Comment

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now