Solved

List off all users who are disabled in the last month in Active directory 2008

Posted on 2013-10-30
3
2,791 Views
Last Modified: 2013-11-14
List off all users who are disabled in the last month in Active directory 2008

HI Guys,
IS any way I can run a command or script in PS to pull all the users who were disabled in the last month?

Also I need to get a list off all users who is created in the last month and there account is Active

Thanks
Rabih
0
Comment
Question by:Rabihhaj
[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 5

Accepted Solution

by:
Recept earned 500 total points
ID: 39613089
The Native AD Powershell way;

Disabled in the last 30 days
Get-ADUser -LDAPFilter {(useraccountcontrol:1.2.840.113556.1.4.803:=2)} -Properties whenChanged | Where-Object {$_.whenChanged -gt (Get-Date).AddDays(-30)} | Select-Object Name, whenChanged

Created in the last 30 days
Get-ADUser -Filter * -Properties whenCreated | Where-Object {$_.whenCreated -gt (get-date).AddDays(-30)} | Select-Object Name, whenCreated


The Quest AD Cmdlets way;

Disabled in the last 30 days
Get-QADUser -Disabled | Where-Object {$_.whenChanged -gt (get-date).AddDays(-30)} | Select-Object Name, whenChanged

Created in the last 30 days
Get-QADUser | Where-Object {$_.whenCreated -gt (get-date).AddDays(-30)} | Select-Object Name, whenCreated


Unfortunately there is no AD attributed for WhenDisabled so all we can do is check for disabled accounts which have been modified in the last 30 days.
0
 
LVL 10

Expert Comment

by:Gajendra Rathod
ID: 39613389
You case install Active Directory Query Tool and find out the user information easily.
0
 

Author Comment

by:Rabihhaj
ID: 39649396
Hi Gajendra,

I do have the tool installed is any instruction you can send me to do that

Thanks
RAbi h
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

733 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