Windows 7 - Blocking failed login attempts

December 2016

You can configure Windows 7 to automatically block access to your session after a predefined amount of failed attempts:

First open a command prompt as administrator
  • Start > Type "cmd" in the search field
  • Press CTRL + Shift + Enter
  • Enter the following command:
    • net accounts /lockoutthreshold:x 
  • Where x represents the number of attempts allowed, replace with a number (10,20..etc)
  • If a user fails to enter the current login information at the end of the 15th attempt, by default the access to the session will be blocked for 30 minutes.
  • Note that your can change this time variable with this command:
    • net accounts /lockoutduration:x
    • Replace x with the number of minutes.

Related :

This document entitled « Windows 7 - Blocking failed login attempts » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.