Solved

List users that have changed their passwords within the last 90 days

Posted on 2015-01-23
2
358 Views
Last Modified: 2015-01-23
Hello,

Would it be possible to obtain a powershell\query to find out who has changed their password within the last 90 days? I run ADDS 2008R2.

Many thanks,
Alex.
0
Comment
Question by:ProjNet
2 Comments
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 40566665
Use the below script...

This code will give you days after 90 days
Import-module activedirectory
$date = get-date
Get-ADUser -Filter * -Properties PasswordLastSet | ? {$_.PasswordLastSet -lt $date.adddays(-90) } | select name,samaccountname, PasswordLastSet

Open in new window



This code will give you users between 90 days and today's date
Import-module activedirectory
$date = get-date
Get-ADUser -Filter * -Properties PasswordLastSet | ? {$_.PasswordLastSet -gt $date.adddays(-90) } | select name,samaccountname, PasswordLastSet

Open in new window


Will.
0
 

Author Closing Comment

by:ProjNet
ID: 40566804
Fantastic, just what I was after, thanks very much!
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

929 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

10 Experts available now in Live!

Get 1:1 Help Now