Solved

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

Posted on 2013-10-30
3
2,554 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
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ports for sccm 2012 1 80
Decommissioning old SMS server 3 62
What the difference between blend and Visual Studio 3 99
ADMT 3.2 LAB Computer Migration not successful 2 49
Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
Know what services you can and cannot, should and should not combine on your server.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

773 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