Policy
Turn on Script Execution
Windows 11 25H2
Policy overview
Key metadata and intent for this policy.
Supported OS tags: Windows7, WindowsServer2008
This policy setting lets you configure the script execution policy, controlling which scripts are allowed to run. If you enable this policy setting, the scripts selected in the drop-down list are allowed to run. The "Allow only signed scripts" policy setting allows scripts to execute only if they are signed by a trusted publisher. The "Allow local scripts and remote signed scripts" policy setting allows any local scrips to run; scripts that originate from the Internet must be signed by a trusted publisher. The "Allow all scripts" policy setting allows all scripts to run. If you disable this policy setting, no scripts are allowed to run. Note: This policy setting exists under both "Computer Configuration" and "User Configuration" in the Local Group Policy Editor. The "Computer Configuration" has precedence over "User Configuration." If you disable or do not configure this policy setting, it reverts to a per-machine preference setting; the default if that is not configured is "No scripts allowed."
Registry values
How enabled and disabled states update the registry.
| Registry location | Type | Enabled value | Disabled value |
|---|---|---|---|
| HKCU\Software\Policies\Microsoft\Windows\PowerShell\EnableScripts | REG_DWORD | 1 | 0 |
Policy elements
Inputs and configuration options exposed by this policy.
| Element | Type | Registry mapping | Constraints & behavior |
|---|---|---|---|
Execution Policy ID ExecutionPolicy | enum | HKCU\Software\Policies\Microsoft\Windows\PowerShell\ExecutionPolicy Type REG_SZ | Options: Allow only signed scripts (AllSigned), Allow local scripts and remote signed scripts (RemoteSigned), Allow all scripts (Unrestricted) |
Other policies in this category
Explore related policies at the same level.
- UserSet the default source path for Update-HelpAt least Microsoft Windows 7 or Windows Server 2008 family
- ComputerSet the default source path for Update-HelpAt least Microsoft Windows 7 or Windows Server 2008 family
- UserTurn on Module LoggingAt least Microsoft Windows 7 or Windows Server 2008 family
- ComputerTurn on Module LoggingAt least Microsoft Windows 7 or Windows Server 2008 family
- UserTurn on PowerShell Script Block LoggingAt least Microsoft Windows 7 or Windows Server 2008 family
- ComputerTurn on PowerShell Script Block LoggingAt least Microsoft Windows 7 or Windows Server 2008 family
- ComputerTurn on PowerShell TranscriptionAt least Microsoft Windows 7 or Windows Server 2008 family
- UserTurn on PowerShell TranscriptionAt least Microsoft Windows 7 or Windows Server 2008 family
- ComputerTurn on Script ExecutionAt least Microsoft Windows 7 or Windows Server 2008 family