Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-06-21
5
Medium Priority
?
467 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 41

Accepted Solution

by:
footech earned 2000 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 41

Expert Comment

by:footech
ID: 39265280
Glad to help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

618 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