Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2015-01-23
2
Medium Priority
?
920 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
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…
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 …

876 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