Wednesday, March 2, 2016

How to Disable/Enable windows Command Prompt


If you’re a network administrator of a company, in a IT company or in school or if you have different user accounts in your computer and you’re the administrator then you may need to block windows command prompt or disable command prompt in windows for a secure internet access. This is a very easy thing to do. You don’t need any third party software to do it. After blocking command prompt if you try to type any command in command prompt you will get this message “The command prompt has been disabled by your administrator”. I will share some easy tips with you. Only you need is admin access of the computer to edit in windows command prompt.

Related: How to block any website in any browser without any software.

Here, the main reason behind blocking command prompt is security. I am suggesting you to also learn How to Enable/Disable/lock/Unlock USB Ports and How to block/prevent access to windows Registry Editor to prevent data leakage and unauthorized file transfer.


How to enable disable windows command prompt

How to Enable /Disable Command Prompt in Windows:

You can disable/block command prompt of windows in two different ways.

  1. Enable or Disable “cmd” using GPO or Group Policy Object.
  2. Enable or Disable “cmd” using Windows Registry Editor.

Follow the following easy steps carefully to Enable /Disable Command Prompt in Windows.

Disable/block windows Command Prompt using Group Policy Object (GPO): 

To try this method you must have the administrative rights of the computer and have to have access to the Microsoft Windows Group Policy editor known as Group Policy Object (GPO). Don’t worry if you’re the administrator you already have it.
Follow those simple steps:

  • Press “windows key+R” to open run
  • Type “gpedit.msc” and press Enter to open the Local Group Policy Editor 

enable disable windows command prompt


  • Navigate to “User Configuration >Administrative Templates >System”
  • Look at the panel at the right side saying “Prevent access to the command prompt”

enable disable windows command prompt as admin


  • Double click on it to set the change in the policy.
  • By default it is set as “Not Configured” >Set it to “Enabled” and click Apply then OK.

enable disable windows command prompt as an administrator

The command prompt has been disabled by your administrator.

Enable/Unblock windows command prompt in Windows by GPO

To unblock command prompt in Windows-
Navigate to “User Configuration>Administrative Templates>System”. In the right panel look for “Prevent access to the command prompt” and set the value to “Not Configured” and press Apply then OK.

Disable/Block Windows Command Prompt using Registry Editor:

Follow those simple steps:

  • Press “windows key+R” to open run
  • Type “regedit” and open Registry Editor. 
  • Navigate to HKEY_CURRENT_USER >Software >Policies >Microsoft >Windows >System
  • Sometime you may not find Windows or System Key then you have to create them.
  • In the “System” look at the right pane and double click “DisableCMD” and change its value to 0.

enable disable windows command prompt cmd by admin


  • If “DisableCMD” is not present then you have to create a new DWORD value, rename it to DisableCMD and set the value to 2.
  • Its okay now.

Now if anyone including administrator wants to try to edit in windows Command prompt, he will see the following message,
“The command prompt has been disabled by your administrator.”

Enable/Unblock windows command prompt in Windows by Registry Editor:

If you want to reverse your choice and enable windows command prompt by Registry Editor simply delete the “DisableCMD DWORD” or set its value to 0.

Shortcut Method of enabling windows command prompt:

If you don’t want to take the hassle of editing in registry mode, there is a very simple solution for you. This method works with Windows 8.1, Windows 8, Windows 7, Windows Vista and Windows XP and may be with windows 10 also, you can better try. If it doesn’t work with windows 10
Follow those simple steps:

  • Type “windows key+R” to open run
  • Simply copy the following command and hit ENTER.
  • REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f
  • Your windows command prompt is now enabled. If it is still disabled then restart your computer.

You will be able to open cmd as admin now.  This simple way you’ll be able to Disable/Enable windows Command Prompt. If you find any difficulties doing so then make a comment. I will surely reply.

Related: Useful run commands we should know.
Also Read: 16 best advanced google search tips and tricks.

No comments:

Post a Comment

Photography & Tech Update:

Hello, I am Mohibullah Mamun. A photographer and a Blogger. Here to share my photography ideas, tips, tricks and update tech news with you. (Read More)

Let's Get Connected:
| Facebook | Google Plus | Twitter |