Disable Guest Login on a Windows Device Using a Command

Using the Commands feature, IT admins can deploy scripts and commands to further their ability to manage systems in JumpCloud. Working with a varied audience of users and environments, we have collaborated to create some "policy" commands for purposes ranging from security to software management. Learn more about commands in Get Started: Commands.

The command listed in this article is specific to disabling the Guest login account for Windows systems. You can also accomplish the same goal using the Built-in Guest Account Status policy for Windows. See Configure Settings for Windows Policies.


When utilizing Windows, you have the ability to decide if you would like to run the command execution via PowerShell or CMD. Though some commands require that one or the other be specified, with the Disable Guest Login example, you can execute using either Windows PowerShell or CMD:

  • Select Windows Powershell to run via PowerShell
  • Unselect Windows Powershell to run via CMD


Windows (CMD or PowerShell)
In the below example, you will mark the local Guest account as inactive and disallow login.

net user guest /active:no

You may re-activate the Guest account at a later time with the following:

net user guest /active:yes

Back to Top

List IconIn this Article

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case