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
615 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
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 transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

752 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