Restrict access to the command line tool in Windows 10

Aug 30, 2018 11:49 GMT  ·  By

The Windows Command Prompt continues to be an incredibly handy tool that’s mostly used by IT pros or more advanced users, but on the other hand, it also allows beginners to do things that would otherwise be impossible from the OS UI.

Even if PowerShell is now the preferred choice for many, Command Prompt is still there in Windows 10, and it remains one of the most used apps for a significant number of users.

But on the other hand, while it’s such a helpful piece of software, it’s more of a double-edged sword. Because for rookies who don’t know exactly what Command Prompt can do, not only that it makes everything look too complex and sometimes overwhelming, but it also lets them do things they wouldn’t otherwise be supposed to do.

Restricting access to Command Prompt isn’t exactly a straightforward process, mostly because Microsoft hasn’t included such settings in Windows 10.

And while you can do it, several steps are required, and depending on the Windows 10 version that you are running, it involves a different tool bundled into the operating system. On Windows 10 Home, you can do this from the Registry Editor, while on Windows 10 Pro, this is possible with both the Registry Editor and the Group Policy Editor.

In both cases an administrator account is required – standard accounts aren’t allowed to make operating system changes and modify registry settings or system policies.

Windows 10 Command Prompt with restricted access

Windows 10 Home

As mentioned, the Windows Registry Editor is the one letting you block access to Command Prompt. Launch the Registry Editor either by clicking the Start menu and typing its name or by pressing Windows key + R and typing regedit.exe.

In the Registry Editor, you need to navigate to the following path:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows Once you’re there, right-click the Windows key (it looks like a folder) and go to New > Key. Name the new key System, so it’ll be displayed like a subdirectory of the Windows folder.

Select the newly-created System key and in the right side of the screen, right click and go to New > DWORD (32-bit) Value. Name the new value DisableCMD.

DisableCMD will be in charge of blocking access to Command Prompt, and you can change its settings with a different value. To do this, double-click it, select Decimal and input value 1 to disable it (value 0 re-enables Command Prompt). Additionally, value 2 disables command prompt, but lets scripts to run.

If access is restricted with this method, the app launches but then displays a message reading “The command prompt has been disabled by your administrator.”

Restricting access to the Windows Control Panel from Registry Editor

Windows 10 Pro

The method detailed above works on Windows 10 Pro as well, but users running this OS version can also turn to the Group Policy Editor to restrict access to Command Prompt.

In this case, what they need to do is to press the Windows key + R and type gpedit.msc to launch the Group Policy Editor. Once the app is loaded, navigate to the following location:

User Configuration > Administrative Templates > System > Prevent access to the command prompt The self-explanatory policy is set by default to Not Configured, so you need to switch it to Enabled. Once you do this, you should notice that another option becomes visible at in the lower part of the UI, letting you choose whether you want command prompt scripts processing to be blocked as well.

If you decide to restore access to Command Prompt at some point in the future, it’s enough to simply toggle the policy to Disabled or to Not Configured.

Restricting access to the Windows Control Panel from Group Policy Editor

Photo Gallery (4 Images)

Windows 10 Command Prompt
Windows 10 Command Prompt with restricted accessRestricting access to the Windows Control Panel from Registry Editor
+1more