Created
June 17, 2021 11:43
-
-
Save D4R4/07ab148f55171386204d030c3eadb595 to your computer and use it in GitHub Desktop.
Powershell scripts to list and sort users by their last password change on-premise and AzureAD
This file contains hidden or 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 passwordlastset -SearchBase "CN=Users,DC=local,DC=net" | Sort-Object -property passwordlastset | ft Name, passwordlastset | |
Connect-MsolService | |
Get-MsolUser -All | Select DisplayName,UserPrincipalName,LastPasswordChangeTimeStamp | Sort-Object -property LastPasswordChangeTimeStamp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment