Enable or Disable user account from command line (CMD)

by admin on November 11, 2010

To disable a user from logging into system, we can disable the account by opening computer management console and double clicking on the entry for the user and then by selecting the check button “Account is disabled

We can do the same by just running a simple command from windows command line.

For example, to disable a user account named John we can run the below command.

Net user John /active:no

To re-enable the account :

Net user John /active:yes

In Windows 7, you need to run the above commands from elevated administrator command prompt(See How to open elevated command prompt in Windows 7 ). You would get the below error when you run them from normal command prompt.

System error 5 has occurred.
Access is denied.

Related Posts:
Remove user from a group

{ 2 comments… read them below or add one }

Ananamous August 24, 2012 at 1:01 pm

This was really helpful! thanks

Reply

Dodi May 12, 2013 at 6:54 am

I’m so very thanks cause my notebook was success enabled account

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: