Solved

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

Posted on 2013-06-21
5
464 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
[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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

724 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