User Tools

Site Tools


networking:windows:active_directory:ad_password_policy

This is an old revision of the document!


Active Directory Password Policy

Default Domain Password Policy

get-addomain | get-adobject -properties * | select *pwd*

Default Domain Password Policy

Fine-Grained Password Policy

Show Fine-Grained Password Policies

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}
networking/windows/active_directory/ad_password_policy.1601047840.txt.gz · Last modified: 2020/09/25 09:30 by gcooper