Ouvrir dans l'explorateur

Restrict legacy JScript execution for Office

Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › MS Security Guide EN : Computer Configuration › Policies › Administrative Templates › MS Security Guide
Pris en charge sur
At least Windows Server 2016, Windows 10 Version 1803
Fichier ADMX
SecGuide.admx
Nom interne
SecGuide/Pol_SecGuide_Legacy_JScript

Explication

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

Registre

HKEY_LOCAL_MACHINE\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE
Nom de la valeur
non défini dans l'ADMX

Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Activer

# Activer : 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

Désactiver

# Désactiver : SecGuide/Pol_SecGuide_Legacy_JScript
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)

Revenir à « Non configuré »

# Revenir à « Non configuré » : 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)

LibelléContrôleValeur de registreType REGContraintes / détails
Excel:POL_SG_excelZone numériquedecimalexcel.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Publisher:POL_SG_mspubZone numériquedecimalmspub.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
PowerPoint:POL_SG_powerpntZone numériquedecimalpowerpnt.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
OneNote:POL_SG_onenoteZone numériquedecimalonenote.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Visio:POL_SG_visioZone numériquedecimalvisio.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Project:POL_SG_winprojZone numériquedecimalwinproj.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Word:POL_SG_winwordZone numériquedecimalwinword.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Outlook:POL_SG_outlookZone numériquedecimaloutlook.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632
Access:POL_SG_msaccessZone numériquedecimalmsaccess.exeREG_SZ
Max : 99999 · Défaut (interface) : 69632

Application

Microsoft Security Baseline (MSS, SecGuide) (Microsoft) — modèles de novembre 2026

Modèles officiels téléchargés le 12 novembre 2026.