How to Enable or Disable guest account

by admin on March 31, 2013

To find out if guest account is enabled on your computer, you can run the below command

net user guest | findstr /C:"active"

Example:

c:\>net user guest | findstr /C:"active"
Account active               No

To enable guest account from command prompt:

Open elevated administrator command prompt and run the below command.

net user guest /active:yes

Example:

C:\>net user guest | findstr /C:"active"
Account active               No
C:\>net user guest /active:yes
The command completed successfully.
C:\>net user guest | findstr /C:"active"
Account active               Yes

C:\>

To disable guest account:

net user guest /active:no

The above commands would work on Windows 7, Windows 8 and also on older versions like XP, Server 2003 etc.

Alternatively, we can enable or disable guest account from GUI using the user management console. Run the command ‘lusrmgr.msc’ from Run window, enter administrator credentials and go to the node ‘Users’ in the console. Open the guest account properties and then select / unselect the check button ‘Account is disabled’.

Enable or disable guest account on Windows 7

{ 6 comments… read them below or add one }

Paul April 12, 2013 at 2:18 pm

Good tip. Helped me to enable guest account on windows 7 machines from a batch file.

Reply

Rikesh April 14, 2013 at 2:15 pm

Thanks. I could disable guest account from cmd on my windows 8 system.

Reply

Mike November 10, 2013 at 7:04 am

I am getting the below error when I tried this command.

c:\>net user guest /active:yes
System error 5 has occurred.
Access is denied.

Reply

Adam November 11, 2013 at 9:59 pm

Mike, you will want to run CMD as an elevated user, right click and press “Run as Administrator”.

Moe July 24, 2014 at 12:30 am

you are using command prompt as a non-admin user, as Adam said, you can use “Run as Administrator” or open your administrator account and do it.

Rita March 1, 2014 at 10:02 pm

Good evening!

I’m having the same problem as Mike here, though i did run CMD as admin.

Is there any way to bypass that system error and forcefully deactivate the guest acc?<

Greetings,
Rita

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: