How to Disable Command Prompt on Windows 10

Written by | Categories: Computers - Tips & Tricks - Computers - Windows 10

Do you want to prevent users from using the Command Prompt?

As you know, the Command Prompt or CMD is a command-line tool that can be used for multiple tasks like executing commands and scripts, creating/deleting folders, troubleshooting errors, performing administrative tasks, fixing the system, and more…

Some PC owners don’t want their users to access the CMD to keep them away from running certain commands that may change the behavior of Windows 10.

The Command Prompt is also known as the modern MS-DOS but it’s not MS-DOS.

Windows 10 comes also with other command-line tools such as PowerShell and Bash.

In this tutorial, you will learn how to disable CMD using Local Group Policy Editor and Registry Editor.

Let’s dive in!

1. Prevent CMD Access on Windows 10 Using Group Policy Editor

Open Run using the Windows+R keyboard shortcut, type in gpedit.msc, click “OK“.

Navigate to “User Configuration” > “Administrative Templates” > “System“.

Double-click on “Prevent access to the command prompt“”.

Select “Enabled” and click “OK“.

Now try to open the Command Prompt, you will get this message:

The command prompt has been disabled by your administrator.

2. Block CMD on Windows 10 Using Registry Editor

Open Run using the Windows+R keyboard shortcut, type in regedit, click “OK“.

Navigate to the following path:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows

Right-click on Windows and choose “New” > “Key” and name it System.

If you already have the System key under Windows move to the next step.

Right-click on the right pane and choose “New” > “DWORD (32-bit) Value“.

Name the newly created value “DisableCMD“.

Double-click on “DisableCMD” and give it the value 2, click “OK“.

If you also want to disable the script execution enter the value “1”.

Try to open the Command Prompt, it has been disabled.

If you have any questions about CMD please leave a comment below.

Thanks for reading this tutorial, don’t forget to share ;)



The author:

Soufiane is a young computer scientist and specialist in web design, knows a lot of things in the computer world. This enthusiast enjoys helping people innovate and learn more about the IT world...

Write a comment:

xD oO ^_^ =] =) ;-( ;) :| :woot: :whistle: :sleep: :sick: :police: :p :o :ninja: :mm: :love: :lol: :kiss: :hmm: :evil: :bandit: :angel: :alien: :D :) :( 8)