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
616 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 71

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 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