How to disable Command Prompt on Windows 11 and 10
Yes, you disable Command Prompt on Windows, and in this guide, we’ll show you two methods to complete this task.
When you purchase through links on our site, we may earn an affiliate commission.Here’s how it works.
Although, onWindows 11(and 10), the Command Prompt console is a useful tool to quickly execute commands to change system settings, run non-graphical applications, troubleshoot problems, and automate tasks, sometimes, it might be necessary to disable the console to prevent users from running unwanted commands, accessing certain programs, or when you have to comply with your organization security policies.
If you must restrict access to the Command Prompt,Windows 10(and 11) includes at least two ways to disable the console, using the Group Policy Editor or Registry Editor. (The user will still be able to launch the Windows Terminal, but the Command Prompt shell won’t work.)
In thishow-to guide, I will explain two ways to disable the Command Prompt console for all users.
Warning:This is a friendly reminder that editing the Registry is risky, and if you do not complete the task correctly, it can cause irreversible damage to your installation. It is recommended that youmake a full backupof the device before proceeding.
How to disable Command Prompt with Group Policy
On Windows 10 (or 11) Pro, Enterprise, and Education, the easiest way to block users from using Command Prompt is with the Local Group Policy Editor.
To disable the Command Prompt shell on Windows, use these steps:
Once you complete the steps, users can still open the console, but they will receive a"The command prompt has been disabled by your administrator"message with an option to press any key to terminate the session. Also, Command Prompt will no longer process compatible scripts, depending on your configuration.
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
If you no longer need to restrict access to Command Prompt, you can undo the changes using the same instructions outlined above, but onstep 5, make sure to select the"Not configured"option.
How to disable Command Prompt from Registry
If you do not want to use the Local Group Policy Editor or your computer has the Home edition of Windows, you can still disable Command Prompt with the Registry.
To disable Command Prompt with the Windows 11 (and 10) Registry, use these steps:
After you complete the steps, the Command Prompt will be disabled for all users. Also, depending on your configuration, users will no longer be able torun batch files scripts.
In the case you want to undo the changes, use the same instructions outlined above, but onstep 4, right-click and delete theSystemkey. However, if the “System” key has additional settings, it is recommended to either set theDisableCMDDWORD value from1or2to0or right-click and delete the DWORD instead of deleting the"System"key.
This guide focuses on disabling Command Prompt for all users, but these instructions can also be used torestrict access to the console for specific users.
More resources
For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:
Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.