Set document behavior if file validation fails
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
This policy setting controls how Office handles documents when they fail file validation.
If you enable this policy setting, you can configure the following options for files that fail file validation:
- Block files completely. Users cannot open the files.
- Open files in Protected View and disallow edit. Users cannot edit the files. This is also how Office handles the files if you disable this policy setting.
- Open files in Protected View and allow edit. Users can edit the files. This is also how Office handles the files if you do not configure this policy setting.
If you disable this policy setting, Office follows the "Open files in Protected View and disallow edit" behavior.
If you do not configure this policy setting, Office follows the "Open files in Protected View and allow edit" behavior.
Registre
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\filevalidation- 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 : excel16/L_SetDocumentBehaviorIfFileValidationFails
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\security\filevalidation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
#
# Options possibles :
# Block files = 0
# Open in Protected View = 1
Set-ItemProperty -Path $k -Name 'openinprotectedview' -Value 1 -Type DWord
# Checked: Allow edit. Unchecked: Do not allow edit.
# décoché : 1
Set-ItemProperty -Path $k -Name 'disableeditfrompv' -Value 0 -Type DWordDésactiver
# Désactiver : excel16/L_SetDocumentBehaviorIfFileValidationFails
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)Revenir à « Non configuré »
# Revenir à « Non configuré » : excel16/L_SetDocumentBehaviorIfFileValidationFails
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\security\filevalidation'
Remove-ItemProperty -Path $k -Name 'openinprotectedview' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'disableeditfrompv' -ErrorAction SilentlyContinueOptions (2)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| L_SetDocumentBehaviorIfFileValidationFailsDropID | Liste déroulanteenum | openinprotectedview | REG_DWORD | Choix par défaut (interface) : n° 1
| ||||||
| Checked: Allow edit. Unchecked: Do not allow edit.L_SetDocumentBehaviorIfFileValidationFailsStr3 | Case à cocherboolean | disableeditfrompv | REG_DWORD | Coché : REG_DWORD = 0Décoché : REG_DWORD = 1 |
Application
Microsoft 365 Apps / Office (Microsoft) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.