Open in the explorer

Restrict legacy JScript execution for Office

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › MS Security Guide
Supported on
At least Windows Server 2016, Windows 10 Version 1803
ADMX file
SecGuide.admx
Internal name
SecGuide/Pol_SecGuide_Legacy_JScript

Explanation

This policy setting controls JScript execution per Security Zone within Internet Explorer and WebBrowser Control (WebOC) for Office applications.

It's important to determine whether legacy JScript is being used to provide business-critical functionality before you enable this setting.

If Enabled, Office applications will not execute legacy JScript for the Internet or Restricted Sites zones and users aren’t notified by the application that legacy JScript execution is restricted. Modern JScript9 will continue to function for all zones.

If Disabled or Not Configured JScript will function without any restrictions.

The values are set in hexadecimal and should be converted prior to changing the setting value. To learn more about Internet Explorer Feature Control Key and the Restrict JScript process-level policy for Windows, please refer to: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330734(v=vs.85)#restrict-jscript-at-a-process-level

Registry

HKEY_LOCAL_MACHINE\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE
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.

Enable

# Enable: SecGuide/Pol_SecGuide_Legacy_JScript
$k = 'HKLM:\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Excel
Set-ItemProperty -Path $k -Name 'excel.exe' -Value '69632' -Type String  # maximum 99999
# Publisher
Set-ItemProperty -Path $k -Name 'mspub.exe' -Value '69632' -Type String  # maximum 99999
# PowerPoint
Set-ItemProperty -Path $k -Name 'powerpnt.exe' -Value '69632' -Type String  # maximum 99999
# OneNote
Set-ItemProperty -Path $k -Name 'onenote.exe' -Value '69632' -Type String  # maximum 99999
# Visio
Set-ItemProperty -Path $k -Name 'visio.exe' -Value '69632' -Type String  # maximum 99999
# Project
Set-ItemProperty -Path $k -Name 'winproj.exe' -Value '69632' -Type String  # maximum 99999
# Word
Set-ItemProperty -Path $k -Name 'winword.exe' -Value '69632' -Type String  # maximum 99999
# Outlook
Set-ItemProperty -Path $k -Name 'outlook.exe' -Value '69632' -Type String  # maximum 99999
# Access
Set-ItemProperty -Path $k -Name 'msaccess.exe' -Value '69632' -Type String  # maximum 99999

Disable

# Disable: SecGuide/Pol_SecGuide_Legacy_JScript
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": SecGuide/Pol_SecGuide_Legacy_JScript
$k = 'HKLM:\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE'
Remove-ItemProperty -Path $k -Name 'excel.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'mspub.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'powerpnt.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'onenote.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'visio.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'winproj.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'winword.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'outlook.exe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'msaccess.exe' -ErrorAction SilentlyContinue

Options (9)

LabelControlRegistry valueREG typeConstraints / details
Excel:POL_SG_excelNumeric boxdecimalexcel.exeREG_SZ
Max: 99999 · Default (UI): 69632
Publisher:POL_SG_mspubNumeric boxdecimalmspub.exeREG_SZ
Max: 99999 · Default (UI): 69632
PowerPoint:POL_SG_powerpntNumeric boxdecimalpowerpnt.exeREG_SZ
Max: 99999 · Default (UI): 69632
OneNote:POL_SG_onenoteNumeric boxdecimalonenote.exeREG_SZ
Max: 99999 · Default (UI): 69632
Visio:POL_SG_visioNumeric boxdecimalvisio.exeREG_SZ
Max: 99999 · Default (UI): 69632
Project:POL_SG_winprojNumeric boxdecimalwinproj.exeREG_SZ
Max: 99999 · Default (UI): 69632
Word:POL_SG_winwordNumeric boxdecimalwinword.exeREG_SZ
Max: 99999 · Default (UI): 69632
Outlook:POL_SG_outlookNumeric boxdecimaloutlook.exeREG_SZ
Max: 99999 · Default (UI): 69632
Access:POL_SG_msaccessNumeric boxdecimalmsaccess.exeREG_SZ
Max: 99999 · Default (UI): 69632

Application

Microsoft Security Baseline (MSS, SecGuide) (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.