Solved

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

Posted on 2013-06-21
5
457 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 39

Accepted Solution

by:
footech earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks a lot!
0
 
LVL 39

Expert Comment

by:footech
Comment Utility
Glad to help!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
Set OWA language and time zone in Exchange for individuals, all users or per database.
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now