Configure Account Lockout Policy in Windows 11
Configuring account lockout policies in Windows 11 protects your system against brute-force password attacks by automatically locking an account after a specified number of failed sign-in attempts. This guide explains how to set the account lockout threshold, the lockout duration, and the counter reset window using both the Local Security Policy tool and the Command Prompt.
Method 1: Using Local Security Policy (Windows 11 Pro, Enterprise, and Education)
- Press Win + R, type
secpol.msc, and press Enter to open the Local Security Policy editor. - In the left pane, expand Account Policies and select Account Lockout Policy.
- In the right pane, double-click Account lockout
threshold.
- Enter the number of invalid logon attempts allowed before the
account is locked (e.g.,
5). Setting this to0disables lockout. - Click Apply.
- Enter the number of invalid logon attempts allowed before the
account is locked (e.g.,
- A prompt will suggest default values for the duration and reset
window. Click OK to accept them, or adjust them
manually:
- Account lockout duration: Double-click this policy
to define how many minutes the account remains locked (e.g.,
30minutes). Setting it to0requires an administrator to manually unlock the account. - Reset account lockout counter after: Double-click this policy to set the number of minutes that must elapse after a failed attempt before the counter resets to zero (must be less than or equal to the lockout duration).
- Account lockout duration: Double-click this policy
to define how many minutes the account remains locked (e.g.,
- Click Apply and OK on each dialog, then close the window.
Method 2: Using Command Prompt (All Windows 11 Editions)
Press Win + S, type
cmd, right-click Command Prompt, and select Run as administrator.To view your current lockout settings, run:
net accountsTo set the Account Lockout Threshold (number of failed attempts before lockout, from 1 to 999):
net accounts /lockoutthreshold:5To set the Account Lockout Duration (time in minutes the account stays locked, from 1 to 99999):
net accounts /lockoutduration:30To set the Reset Lockout Counter Window (time in minutes before the failed attempt counter resets):
net accounts /lockoutwindow:30Run
net accountsagain to verify that your new settings have been applied successfully.