x

Disclaimer: This post may contain affiliate links, meaning we get a small commission if you make a purchase through our links, at no cost to you. For more information, please visit our Disclaimer Page.

If someone has physical access to your Windows computer, they might guess your password and attempt to log in. By default, people can enter wrong passwords as many times as they want. Thus, they can guess a list of the possible passwords that you may use. Then try one by one until they can access your PC.

For that reason, you should enable the temporary lock feature that will prevent people from guessing your Windows password. Instead of having unlimited times, you can only enter your password a specific number of times, such as five times. After five failed attempts, you won’t be able to fill out the password in a specific time that you set.

So, if you are worried about someone trying to guess your computer password, you should enable this feature.

Windows Lockout Message

The referenced account is currently locked out and may not be logged on to.

How can I temporarily lock my computer if someone tries to guess my password?

In this article, I will show you two methods you can use to prevent people from attempting to access your Windows PC with bad passwords.

How To Use The Local Group Policy Editor To Set A Sign-In Limit

It’s very easy to set a sign-in limit with the Local Group Policy Editor. It’s a very powerful tool that helps you adjust system settings and a lot more.

To get started, press Windows + R, type “gpedit.msc” without the quotes and press Enter.

Open gpedit.msc with Command Prompt

From the Local Group Policy Editor window, look at the left side and then navigate to Computer Configuration -> Windows Settings -> Security Settings -> Account Policies -> Account Lockout Policy.

Local Group Policy Editor

Look at the right side and double-click on “Account lockout threshold” option.

By default, the value of this option is zero (0). That means this option is disabled. To activate it, choose any number you want (greater than 0). To avoid accidentally typing the wrong password yourself, you can decide to lock out your PC after three or five failed attempts. Then click the “OK” button when you are done.

Account lockout threshold

After pressing “OK” button, your Windows PC also automatically configures two other options:

  • Account lockout duration: The time that your computer is locked against any further login attempts.
  • Reset account lockout counter after: The time that the threshold counter will reset.

Account Lockout Policy

Don’t understand?

For example, you set:

  • Account lockout threshold: 3
  • Account lockout duration: 30 minutes
  • Reset account lockout counter after: 20 minutes

Now, enter a bad password and then do it again, and again. The result is that your computer will lock for 30 minutes. You only can enter the password to log-in after 30 minutes.

However, if you enter a bad password and then do it again only two times, not three times, then after 20 minutes, the lockout counter will be reset, and you will have another three attempts. If you think 30 minutes is too long, just adjust it.

After that, you have to log out and log back in to let the changes take effect. In case you want to disable this feature, just set “Account lockout threshold” option back to 0.

[full-related slug1=”new-task-manager-windows-10″ slug2=”detect-hardware-failures”]

How To Use Command Prompt To Set A Sign-In Limit

Along with Local Group Policy, you can also turn on lockout threshold, set lockout duration time and lockout counter reset time with the Command Prompt. You just need to remember a few commands and everything will be done quickly.

To get started, press Windows + X, and then press A to open the Command Prompt with administrator privileges.

After that, use the commands below to turn on, turn off, adjust lockout duration time, as well as lockout reset time.

  • net accounts – View the current status of lockout threshold.
  • net accounts /lockoutthreshold:3 – Set lockout threshold to be three times.
  • net accounts /lockoutduration:30 – Set lockout duration to be 30 minutes.
  • net accounts /lockoutwindow:20 – Set lockout reset time to be 20 minutes.
  • net accounts /lockoutthreshold:0 – Disable lockout.

Set Lockout with Command Prompt

That’s it!

Now, your computer will prevent people from accessing it they enter bad passwords too many times. When you meet the threshold, you will be given the following message to tell you are unable to log in. Also, you will not know how long your Windows PC will be locked out.