Whilst the Windows Command Prompt Is a very beneficial tool for performing a variety of tasks, It can also work against the end user, namely (for example) hackers who gain remote access thereby control the target PC using a serious of commands. For Instance, files can be deleted, local user accounts can be viewed and edited and the list goes on. In this tutorial, I will show you how to disable access to the Command Prompt via the good old "Group Policy Editor".
Before I begin, do note that the Group Policy Editor Is only available In Windows 10 Pro, Enterprise and Education editions. On the grounds you have either of these Installed, this guide will serve you well. I shall also go one step further and prevent Batch files from executing- which can also be used for malicious purposes. So let's begin.
Open the Run menu, type "gpedit.msc" (no quotes) and hit OK.
The Group Policy Editor window will now open. Navigate to the follow directory:
"User Configuration > Administrative Templates > System".
Then on the right pane, double-click:
"Prevent access to the command prompt".
On the left-hand side, click the "Enabled" radio button. Under Options, select "Yes" via the drop-down menu. This part also disables batch files. To finalize the process, hit "OK".
Here's what happened when I tried opening the Command Prompt, even with elevated/administrator privileges. Access was denied, which Is exactly what I wanted.
Now to put the batch file to the test. Upon executing It, the very same message was displayed, hence access denied.
This Is a very simplistic method to restrict access to both the Command Prompt & batch files from executing. To enable access as per normal, reverse the above process.
Given there's quite a few methods available, the majority of computational users may not be aware of "how" the Command Prompt has been disabled, thus this particular tweak Is very effective Indeed.