Dynamic Code Settings
Explanation
This policy controls the dynamic code settings for Microsoft Edge.
Disabling dynamic code improves the security of Microsoft Edge by preventing potentially hostile dynamic code and third-party code from making changes to Microsoft Edge's behavior. However this might cause compatibility issues with third-party software (for example, certain printer drivers) that must run in the browser process.
If you set this policy to 0 (the default) or leave unset, then Microsoft Edge uses the default settings.
If you set this policy to 1 – (EnabledForBrowser) then the Microsoft Edge browser process is prevented from creating dynamic code.
Policy options mapping:
* Default (0) = Default dynamic code settings
* EnabledForBrowser (1) = Prevent the browser process from creating dynamic code
Use the preceding information when configuring this policy.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\EdgeHKEY_CURRENT_USER\Software\Policies\Microsoft\Edge- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Computer (HKLM)
Enable
# Enable: msedge/DynamicCodeSettings
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Dynamic Code Settings
# Possible options:
# Default dynamic code settings = 0
# Prevent the browser process from creating dynamic code = 1
Set-ItemProperty -Path $k -Name 'DynamicCodeSettings' -Value 0 -Type DWordDisable
# Disable: msedge/DynamicCodeSettings
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": msedge/DynamicCodeSettings
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'DynamicCodeSettings' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Options (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Dynamic Code SettingsDynamicCodeSettings | Drop-down listenum | DynamicCodeSettings | REG_DWORD |
|
Application
Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.