This is an old revision of the document!
http://techgenix.com/configuring-fine-grained-password-policies/
CloudPanel: https://kb.knowmoreit.com/how-to/setting-up-user-password-expiring-notices/
In PowerShell, load this function:
function Get-MTUserPasswordPolicy ($Identity) { $Fgpp = (Get-ADUserResultantPasswordPolicy -Identity $Identity).Name [string]$Policy = switch ($Fgpp) { $null {"Default Domain Policy"} {!($null)} {$Fgpp} } $Return = New-Object -TypeName PSObject $Return | Add-Member -MemberType NoteProperty -Name Identity -Value $Identity $Return | Add-Member -MemberType NoteProperty -Name PasswordPolicy -Value $Policy return $Return }
Then call the function:
Get-ADUser -Filter {Enabled -eq $True} | ForEach-Object {Get-MTUserPasswordPolicy -Identity $_.SamAccountName}