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

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

Its a 2008 R2 domain.

Question by:Ackles
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
LVL 40

Accepted Solution

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

LVL 11

Author Comment

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

LVL 11

Author Comment

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

LVL 11

Author Closing Comment

ID: 39265257
Thanks a lot!
LVL 40

Expert Comment

ID: 39265280
Glad to help!

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
O365 - Unassign service within enterprise license 4 35
NTP Servers 4 47
A question on Active Directory LDS 4 24
Flush end users Deleted Items via PowerShell 2 28
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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 …

733 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