Project

PasswordSolution

This module allows the creation of password expiry emails for users, managers, administrators, and security according to defined templates. It's able to work with different rules allowing to fully customize who gets the email and when.

Stars169
Forks22
Open issues2
PowerShell Gallery downloads32712
Releasev2.1.0
Language: PowerShell Updated: 2026-02-14T21:45:14.0000000+00:00

Curated Examples

Normalize password-quality output

Use PasswordSolution replacements to make password-quality output easier to read.

This pattern is useful when report fields contain compact codes that need display-friendly values.

It is adapted from Examples/Example-FindUsersPasswordQualityConsoleWithReplacements.ps1.

Example

Import-Module PasswordSolution

$replacements = @(
    New-PasswordConfigurationReplacement -PropertyName 'Country' -Type eq -PropertyReplacementHash @{
        'PL'      = 'Poland'
        'DE'      = 'Germany'
        'US'      = 'United States'
        'Unknown' = 'Not specified'
    } -OverwritePropertyName 'CountryName'
)

$users = Find-PasswordQuality -Replacements $replacements
$users | Select-Object Name, SamAccountName, CountryName | Format-Table -AutoSize

What this demonstrates

  • defining value replacements
  • writing normalized values to a new property
  • keeping report output readable for reviewers

Source