How to Disable Command Prompt in Windows

Disable Command Prompt in Windows

CMD or Command prompt is a Character User Interface (CLI) tool in Windows which allows the users to interact with system. Command Prompt is used to execute entered commands. Most of those command prompt commands are used to automate tasks via scripts and batch files, perform advanced administrative functions, and troubleshoot and solve certain kinds of Windows issues.

It is a very powerful tool as it can be used to manually remove viruses and malware as well as preventing their effects. While Command Prompt probably isn't a tool most of you will use on a regular basis, cmd commands can really come in handy now and then, maybe to troubleshoot a specific Windows problem or to automate some kind of task.

As a Windows administrator of a computer system with multiple user accounts, you can intentionally disable the command line thereby preventing users from making changes to some critical settings on the system. When this is done and the user runs the cmd.exe, the window opens with an error message that says “The command prompt has been disabled by your administrator”.

In this tutorial, I am going to teach you a simple way you can go about to disable the command prompt using the group policy command. Opening Command Prompt will only take you few seconds, no matter what version of Windows you're using.


Using the Group Policy Editor to stop command prompt

Press Win key + R for the Run dialog box

Type gpedit.msc and press Enter on the keyboard or click the OK button below

Run Window

Navigate to the User Configuration > Administrative Templates > System

Local Group Policy Editor

Scroll down to locate “Prevent access to the command prompt” and double click on it

When the Prevent access to the command prompt” properties window pops up, select the Enabled option and Apply and finally click OK to save the changes.

Prevent access to Command Prompt Properties Window

Refresh the system and run command prompt windows. If the change is not effected, restart the PC. You have to see a window like the one below

Disabled Command Prompt Window
Disabled Command Prompt Window

NB: This change in Windows cmd needs to be made in the admin’s account and will take effect in any other account that exists on the system.

I hope you found this tutorial interesting and helpful. Let’s get interactive by dropping your questions and suggestions in the comments box below. Enjoy!!!


Comments