Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
618 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 668 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 668 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 664 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
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…

730 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