Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Retrieve Active directory disabled account by Date

I need a script that retrieves Active Directory disabled accounts by Date.

for instance  smith account disabled on 02/12/2013

Any help will be very much appreciated.

Thank you
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

Use the following command below to accomplish this...

Import-module activedirectory
$date = get-date 02/12/2013
get-aduser -filter * -properties * | ? {$_.enabled -eq $false -and $_.whenChanged -eq $date} | select Name, whenChanged, Enabled

Open in new window




Will.
Avatar of jskfan

ASKER

it does not display anything
ASKER CERTIFIED SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

Thank you Guys