A new domain allows 7-character passwords and never locks an account, however many wrong guesses are made. Fine-grained password policies fix both, and let admins have a stricter rule than everyone else.
Passwords are longer and guessing is cut off.
A new domain allows 7-character passwords and unlimited wrong guesses.
Create one policy for all users and a stricter one for admins, then check who gets which.
What you are setting
| Policy | Applies to | Minimum length | Lockout |
|---|---|---|---|
| CON-PSO-AllUsers | Domain Users | 14 | 15 minutes after 10 wrong tries |
| CON-PSO-Admins | Domain Admins | 16 | 30 minutes after 5 wrong tries |
When two policies apply to one person, the lower precedence number wins. Admins are in both groups, so they get the admin policy.
You can, but it gives one rule for everybody. Fine-grained policies sit on top of it and cannot be overwritten by Group Policy.
Create the policy for everyone
New-ADFineGrainedPasswordPolicy -Name 'CON-PSO-AllUsers' -Precedence 50 `
-MinPasswordLength 14 -PasswordHistoryCount 24 -ComplexityEnabled $true -ReversibleEncryptionEnabled $false `
-MinPasswordAge 1.00:00:00 -MaxPasswordAge 0.00:00:00 `
-LockoutThreshold 10 -LockoutDuration 00:15:00 -LockoutObservationWindow 00:15:00 `
-ProtectedFromAccidentalDeletion $true
Add-ADFineGrainedPasswordPolicySubject -Identity 'CON-PSO-AllUsers' -Subjects 'Domain Users'Create the stricter policy for admins
New-ADFineGrainedPasswordPolicy -Name 'CON-PSO-Admins' -Precedence 10 `
-MinPasswordLength 16 -PasswordHistoryCount 24 -ComplexityEnabled $true -ReversibleEncryptionEnabled $false `
-MinPasswordAge 1.00:00:00 -MaxPasswordAge 0.00:00:00 `
-LockoutThreshold 5 -LockoutDuration 00:30:00 -LockoutObservationWindow 00:30:00 `
-ProtectedFromAccidentalDeletion $true
Add-ADFineGrainedPasswordPolicySubject -Identity 'CON-PSO-Admins' -Subjects 'Domain Admins'| Part | Meaning |
|---|---|
| MaxPasswordAge 0 | Passwords do not expire on a timer. The NCSC advises long passwords over regular forced changes. Use 90.00:00:00 if your policy needs expiry. |
| LockoutObservationWindow | How long the count of wrong tries is remembered. |
| LockoutDuration | How long the account stays locked before it unlocks by itself. |
Check who gets which policy
Test with one ordinary user and one admin.
Get-ADFineGrainedPasswordPolicy -Filter * | Format-Table Name, Precedence, MinPasswordLength, LockoutThreshold -AutoSize (Get-ADUserResultantPasswordPolicy -Identity doej).Name (Get-ADUserResultantPasswordPolicy -Identity Administrator).Name
The user should return CON-PSO-AllUsers and the admin CON-PSO-Admins.
What users notice
- Existing passwords keep working. The new length applies the next time someone changes their password.
- Lockout starts straight away. A locked account unlocks by itself when the time is up.
- Younger pupils may need a shorter rule. Add a third policy for a pupil group with a lower precedence number than 50.
Unlock an account early
Unlock-ADAccount -Identity doej
Done when
Both policies are listed, an ordinary user returns CON-PSO-AllUsers and an admin returns CON-PSO-Admins.


