Curated Examples
Review expiring passwords
Use PSPasswordExpiryNotifications to review users with expiring passwords.
This pattern is useful as the first validation step before building reminder templates or delivery rules.
It is adapted from Example/ListUsers.ps1.
Example
Import-Module PSPasswordExpiryNotifications
Find-PasswordExpiryCheck |
Where-Object { $_.PasswordNeverExpires -eq $false } |
Sort-Object -Property PasswordLastSet |
Format-Table DisplayName, UserPrincipalName, DateExpiry, DaysToExpire, PasswordLastSet -AutoSize
What this demonstrates
- reading password expiry data
- excluding accounts with non-expiring passwords
- sorting the output for operational review