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“.

Disable Command Prompt Cmd Windows 10 1 Gpedit Msc Run

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

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

Disable Command Prompt Cmd Windows 10 2 Local Group Policy Editor Administrative Templates System Prevent Access

Select “Enabled” and click “OK“.

Disable Command Prompt Cmd Windows 10 3 Prevent Access To The Command Prompt Enabled

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

The command prompt has been disabled by your administrator.

Disable Command Prompt Cmd Windows 10 4 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“.

Disable Command Prompt Cmd Windows 10 5 Regedit Run Registry Editor

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.

Disable Command Prompt Cmd Windows 10 6 Registry Editor New Key

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

Name the newly created value “DisableCMD“.

Disable Command Prompt Cmd Windows 10 7 New Dword Value 32 Bit Registry Editor

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”.

Disable Command Prompt Cmd Windows 10 8 Disablecmd Edit Dword 32 Bit Value

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

Disable Command Prompt Cmd Windows 10 4 The Command Prompt Has Been Disabled By Your Administrator

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

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

Soufiane – Easytutorial.com