Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-10-30
3
Medium Priority
?
3,493 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 1500 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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