Run the script below to list existing policies. This displays all defined fine-grained password policies.
Get-ADFineGrainedPasswordPolicy -Filter *Check the settings for a specific policy. This script displays the password length, complexity, and lockout settings.
Get-ADFineGrainedPasswordPolicy -Identity "AdminsPolicy"Check which users are following a specific policy. This script lists users and groups affected by the policy.
Get-ADFineGrainedPasswordPolicySubject -Identity "AdminsPolicy"To apply a policy to a new user, run the script below.
Add-ADFineGrainedPasswordPolicySubject -Identity "AdminsPolicy" -Subjects "JohnDoe"To remove a user from a policy, run the script below.
Remove-ADFineGrainedPasswordPolicySubject -Identity "AdminsPolicy" -Subjects "JohnDoe"Check if fine-grained password policies (FGPP) are enabled by running the script below.
Get-ADFineGrainedPasswordPolicy -Filter *Apply FGPP to a specific user by running the script below.
Add-ADFineGrainedPasswordPolicySubject -Identity "StrictPolicy" -Subjects "username"Yes, FGPP takes priority for assigned users or groups.