en-US windows computer user

Turn on Script Execution

Verified with Windows 11 25H2 — updated on July 30, 2026

Windows 11 25H2

Supported on: At least Microsoft Windows 7 or Windows Server 2008 family

Path in the GPO console

Computer Configuration\Administrative Templates\Windows Components\Windows PowerShell

Description

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

HKLM Software\Policies\Microsoft\Windows\PowerShell
HKCU Software\Policies\Microsoft\Windows\PowerShell

Value name: EnableScripts

Enabled: EnableScripts = 1

Disabled: EnableScripts = 0

More options available

Options

Execution Policy
ExecutionPolicy enum
  • Allow only signed scripts -> AllSigned
  • Allow local scripts and remote signed scripts -> RemoteSigned
  • Allow all scripts -> Unrestricted

MDM / Intune (CSP)

Device ./Device/Vendor/MSFT/Policy/Config/ADMX_PowerShellExecutionPolicy/EnableScripts
User ./User/Vendor/MSFT/Policy/Config/ADMX_PowerShellExecutionPolicy/EnableScripts
DeviceUser Since Windows 10, version 2004 with KB5005101 [10.0.19041.1202] and later | Windows 10, version 20H2 with KB5005101 [10.0.19042.1202] and later | Windows 10, version 21H1 with KB5005101 [10.0.19043.1202] and later | Windows 11, version 21H2 [10.0.22000] and later Official mapping (Microsoft Learn)

Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

Scope

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Turn on Script Execution
; State: Enabled
; Scope: Computer (HKLM)
; Supported on: At least Microsoft Windows 7 or Windows Server 2008 family

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell]
"EnableScripts"=dword:00000001
"ExecutionPolicy"="AllSigned"
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Turn on Script Execution
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Microsoft Windows 7 or Windows Server 2008 family

$path = 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EnableScripts' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ExecutionPolicy' -Value 'AllSigned' -Type String

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview