Created
December 10, 2014 15:19
-
-
Save nopslider/c8db16d30339faaa12ac to your computer and use it in GitHub Desktop.
Find users that haven't changed their password in the last year
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADUser -Filter * -Properties * ` | |
| where {($_.enabled -eq $true) -and ($_.lockedout -eq $false)} ` | |
| where {$_.passwordlastset -lt (Get-Date).AddYears(-1)} ` | |
| select SamAccountName, passwordlastset ` | |
| sort passwordlastset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment