Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

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

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
Ackles
Asked:
Ackles
  • 3
  • 2
1 Solution
 
footechCommented:
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
 
AcklesAuthor Commented:
Great, it gives me the whole properties of the user, is it possible only to show the First, Last & SamAccountName?

A
0
 
AcklesAuthor Commented:
Alight, I figured it out
Thanks, let me run one more test & then I will close it.

A
0
 
AcklesAuthor Commented:
Thanks a lot!
0
 
footechCommented:
Glad to help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now