Lock and restart the computer after entering the wrong password several times

To increase the security of Windows PCs , Microsoft has integrated a function in the editor of the ” Local Security Policy ” (secpol.msc) with which you can protect the Windows PC. This protection works in such a way that the PC simply restarts the PC automatically after entering a number of incorrect password entries.

You will find the appropriate security policy in the area

Security Settings / Local Policies / Security Options

The directive is then called

Interactive logon: Computer account lockout threshold

We have exemplified this below.

Interactive logon threshold for computer account lockout

Then there is only the period in the password security guideline

Invalid login attempts

With this value you determine how often the user of the password or password may be entered incorrectly until the PC is locked. In our example we have set the value “3” .

This lock will force the keyboard shortcut


Press Ctrl + Alt + Remove to log in again. This then looks to the user as follows.

The password is incorrect. If you enter the wrong password too often ...

The exact password message on the lock screen is as follows:

The password is incorrect. If you enter the wrong password too often, Windows will automatically restart to protect your data.
Press CTRL + ALT + DEL to unlock.

By setting this value you can increase the security of your Windows PC quickly and easily. Microsoft has released the following information regarding this policy. PCs that are encrypted with Bitlocker in particular experience additional security as the Bitlocker key has to be re-entered after the password has been incorrectly attempted.

This security setting determines the number of failed login attempts that result in the computer restarting. Computers that have BitLocker enabled to protect operating system volumes are locked and can only be recovered by providing a recovery key on the console. Make sure that the appropriate recovery policies are enabled.

You can set the value between 1 and 999 failed login attempts . If you set the value to 0, the computer will never be locked. Values ​​from 1 to 3 are interpreted as 4.

Incorrect password attempts for workstations or member servers that were locked either with CTRL + ALT + DEL or with password-protected screen savers count as failed login attempts.

Default value: 0

Further information on Windows logins, passwords and passwords can also be found in these articles.

– Automatically lock Windows after invalid logins
– Create or change password security questions for Windows 10
– Manage, edit or delete saved passwords in the Edge browser
– Hide button for displaying the Windows password in Windows 10
– Delete cookies, form data and passwords in the Edge browser
– Windows 10 Deactivate password query on Surface after pressing the Power button
– Show WLAN password in plain text via DOS command
– Reset Windows password of a Hyper-V VM
– Reset administrator password