Prevent access to the command prompt
Jump to overview

Policy overview

Key metadata and intent for this policy.

User
Category
System
Supported on
At least Windows 2000

Supported OS tags: Windows10, Windows10RT, Windows11, Windows2000, Windows7, Windows8, Windows81, WindowsRT, WindowsRT81, WindowsServer2003, WindowsServer2008, WindowsServer2012, WindowsServer2012R2, WindowsServer2016, WindowsVista, WindowsXP

This policy setting prevents users from running the interactive command prompt, Cmd.exe. This policy setting also determines whether batch files (.cmd and .bat) can run on the computer. If you enable this policy setting and the user tries to open a command window, the system displays a message explaining that a setting prevents the action. If you disable this policy setting or do not configure it, users can run Cmd.exe and batch files normally. Note: Do not prevent the computer from running batch files if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Remote Desktop Services.

Internal name
DisableCMD
Policy ID
2c04b7bbc676
Elements
1

Registry values

How enabled and disabled states update the registry.

No explicit registry values are set for enabled or disabled states.

Policy elements

Inputs and configuration options exposed by this policy.

ScopeElementTypeRegistry mappingConstraints & behaviorCopy
User
Disable the command prompt script processing also?
ID DisableCMDScripts
enum
Path
Software\Policies\Microsoft\Windows\System
Value name
DisableCMD
Type
REG_DWORD
Options: Yes (1), No (2)
Disable the command prompt script processing also?
User · Type enum
Registry mapping
Path
Software\Policies\Microsoft\Windows\System
Value name
DisableCMD
Type
REG_DWORD
Details
Options: Yes (1), No (2)