Walker News

How To Unlock Windows Account At Command Prompt?

My Windows 7 laptop is configured to lock local account for 30 minutes after 3 consecutive login with wrong password and the stupid me always fall into this trap that I setup myself :(

Seriously, I don’t want to wait 30 minutes for Windows to unlock the account, because I know the password and I have enabled the Windows 7 built-in Administrator account with a strong password.

Having said that, I can use “Switch User” to login with built-in Administrator account (without logout the locked account) and from there to unlock the locked Windows account.
Verdict: better enable and secure Windows 7 built-in Administrator account for contingency and security purpose. By default installation, the powerful built-in administrator account has no password!

In order to make the process fast and precise, I choose not to click the User Account dialog box. So, I created and saved this Windows Command Script file (a.k.a. Windows batch file) at Desktop for me to easily unlock local Windows account:
@echo off

wmic useraccount get name,lockout

wmic useraccount set lockout=false

wmic useraccount get name,lockout

The first wmic command is to show local account lock status, the second wmic command is to prompt me which account to unlock, and the final wmic command is simply called to display the lock status again (for review/confirmation purpose).

Custom Search

2018  •  Privacy Policy