How to Disable the Command Prompt (and CMD and BAT) in Windows 10 & 11
By Timothy Tibbetts |
PowerShell and Windows Terminal have almost entirely replaced the Command Prompt in Windows 10 & 11, and in some cases, many PowerShell Commands won't work. If you like, you can disable the Command Prompt from running on Windows 10 in a couple of different ways.
1: Disable the Command Prompt with Group Policy Editor
Windows 10 Home users might want to take a few minutes and Enable Group Policy Editor.
Open Group Policy Editor and navigate to User Configuration > Administrative Templates > System.
Double-click Prevent access to the command prompt on the right.

Click on Enabled and click OK.
You can also optionally disable the user from executing *.bat and *.cmd scripts.

2: Disable the Command Prompt with Regedit
Open the Registry Editor and navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System
If you don't have a System key, right-click on Windows and select New > Key and name it System.
Click on System, then in the right window right-click and select New > DWORD > 32-bit Value, and name that DisableCMD
Double-click DisableCMD and change the Value Data to 1 to disable Command Prompt and *.bat and *.cmd. Change the Value data to 2 to disable only the Command Prompt.
If you change your mind or temporarily allow the Command Prompt, you can delete this key by changing the Value data back to 0.
When someone tries to run the Command Prompt, they will see a message stating that it has been disabled.

Similar:
How to Disable the Run Dialog in Windows 10
How to Disable the Registry Editor (Regedit) in Windows
How to Get Command Prompt Back on the Windows 10 Power User Menu
The Ultimate List of Every Known Command Prompt and PowerShell Commands
PowerShell and Command Prompt 101
How-To Run PowerShell or the Command Prompt as Administrator
comments powered by Disqus
1: Disable the Command Prompt with Group Policy Editor
Windows 10 Home users might want to take a few minutes and Enable Group Policy Editor.
Open Group Policy Editor and navigate to User Configuration > Administrative Templates > System.
Double-click Prevent access to the command prompt on the right.

Click on Enabled and click OK.
You can also optionally disable the user from executing *.bat and *.cmd scripts.

2: Disable the Command Prompt with Regedit
Open the Registry Editor and navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System
If you don't have a System key, right-click on Windows and select New > Key and name it System.
Click on System, then in the right window right-click and select New > DWORD > 32-bit Value, and name that DisableCMD
Double-click DisableCMD and change the Value Data to 1 to disable Command Prompt and *.bat and *.cmd. Change the Value data to 2 to disable only the Command Prompt.
If you change your mind or temporarily allow the Command Prompt, you can delete this key by changing the Value data back to 0.
When someone tries to run the Command Prompt, they will see a message stating that it has been disabled.

Similar:
comments powered by Disqus