Solved

Get users who have changed the password in last days in a particular oou

Posted on 2013-06-21
5
462 Views
Last Modified: 2013-06-21
Hi,
I want to find out users in a  specific OU who have changed password in last days.

Its a 2008 R2 domain.

Regards,
A
0
Comment
Question by:Ackles
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 39265223
This would do it.
Import-Module ActiveDirectory
$days = -30
Get-ADUser -filter * -property PasswordLastSet -searchBase "OU=someOU,DC=domain,DC=com" | Where { $_.PasswordLastSet -gt (Get-Date).AddDays($days) }

Open in new window

0
 
LVL 11

Author Comment

by:Ackles
ID: 39265237
Great, it gives me the whole properties of the user, is it possible only to show the First, Last & SamAccountName?

A
0
 
LVL 11

Author Comment

by:Ackles
ID: 39265241
Alight, I figured it out
Thanks, let me run one more test & then I will close it.

A
0
 
LVL 11

Author Closing Comment

by:Ackles
ID: 39265257
Thanks a lot!
0
 
LVL 40

Expert Comment

by:footech
ID: 39265280
Glad to help!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
A brief introduction to what I consider to be the best editor for PowerShell.
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…

860 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