Ouvrir dans l'explorateur

Configurer le comportement de récupération de fichier endommagé

Configure Corrupted File Recovery behavior

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Système › Dépannage et diagnostics › Récupération de fichier endommagé EN : Computer Configuration › Policies › Administrative Templates › System › Troubleshooting and Diagnostics › Corrupted File Recovery
Pris en charge sur
Au minimum Windows Vista EN : At least Windows Vista
Fichier ADMX
FileRecovery.admx
Nom interne
FileRecovery/WdiScenarioExecutionPolicy

Explication

Texte français issu de Windows 11 26H2

Ce paramètre de stratégie permet de configurer le comportement de récupération de fichier endommagé à l’un des trois états suivants :

Normal : la détection, le dépannage et la récupération des fichiers endommagés commencent automatiquement avec un affichage d’interface utilisateur minimal. Windows tente d’afficher une boîte de dialogue lorsqu’un redémarrage du système est nécessaire. Il s’agit du comportement de récupération de fichier endommagé par défaut.

Silencieux : la détection, le dépannage et la récupération des fichiers endommagés commencent automatiquement sans interface utilisateur. Windows enregistre un événement d’administrateur lorsqu’un redémarrage du système est nécessaire. Ce comportement est recommandé pour un fonctionnement sans périphérique de contrôle.

Dépannage seulement : la détection et le dépannage des fichiers endommagés commencent automatiquement sans interface utilisateur. La récupération n’est pas tentée automatiquement. Windows enregistre un événement d’administrateur avec des instructions si une récupération manuelle est possible.

Si vous activez ce paramètre, le comportement de récupération de fichier endommagé prend au choix l’état normal (par défaut), silencieux ou dépannage seulement.

Si vous désactivez ce paramètre, le comportement de récupération de fichier endommagé est désactivé. Aucun dépannage ou aucune résolution n’est tenté.

Si vous ne configurez pas ce paramètre, le comportement de récupération de fichier endommagé prend le comportement normal.

Aucun redémarrage du système ou de services n’est nécessaire pour l’application immédiate des modifications apportées à cette stratégie après une actualisation de la stratégie de groupe.

Remarque : ce paramètre de stratégie ne s’applique que si le service de stratégie de diagnostic est en cours d’exécution. Lorsque ce service est arrêté ou désactivé, la récupération de fichier système n’est pas tentée. Le service de stratégie de diagnostic peut être configuré avec le composant logiciel enfichable Services dans Microsoft Management Console.

This policy setting allows you to configure the recovery behavior for corrupted files to one of three states:

Regular: Detection, troubleshooting, and recovery of corrupted files will automatically start with a minimal UI display. Windows will attempt to present you with a dialog box when a system restart is required. This is the default recovery behavior for corrupted files.

Silent: Detection, troubleshooting, and recovery of corrupted files will automatically start with no UI. Windows will log an administrator event when a system restart is required. This behavior is recommended for headless operation.

Troubleshooting Only: Detection and troubleshooting of corrupted files will automatically start with no UI. Recovery is not attempted automatically. Windows will log an administrator event with instructions if manual recovery is possible.

If you enable this setting, the recovery behavior for corrupted files will be set to either the regular (default), silent, or troubleshooting only state.

If you disable this setting, the recovery behavior for corrupted files will be disabled. No troubleshooting or resolution will be attempted.

If you do not configure this setting, the recovery behavior for corrupted files will be set to the regular recovery behavior.

No system or service restarts are required for changes to this policy to take immediate effect after a Group Policy refresh.

Note: This policy setting will take effect only when the Diagnostic Policy Service (DPS) is in the running state. When the service is stopped or disabled, system file recovery will not be attempted. The DPS can be configured with the Services snap-in to the Microsoft Management Console.

Registre

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{8519d925-541e-4a2b-8b1e-8059d16082f2}
Nom de la valeur
ScenarioExecutionEnabled
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

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 : FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{8519d925-541e-4a2b-8b1e-8059d16082f2}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 1 -Type DWord
# Niveau d’exécution de scénario
# Options possibles :
#   Troubleshooting Only = 1
#   Regular = 2
#   Silent = 3
Set-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -Value 2 -Type DWord

Désactiver

# Désactiver : FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{8519d925-541e-4a2b-8b1e-8059d16082f2}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{8519d925-541e-4a2b-8b1e-8059d16082f2}'
Remove-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -ErrorAction SilentlyContinue

Options (1)

LibelléContrôleValeur de registreType REGContraintes / détails
Niveau d’exécution de scénarioScenario Execution LevelWdiScenarioExecutionPolicyLevelListe déroulanteenumEnabledScenarioExecutionLevelREG_DWORD
Obligatoire · Choix par défaut (interface) : n° 1
LibelléValeur
Troubleshooting OnlyREG_DWORD = 1
RegularREG_DWORD = 2
SilentREG_DWORD = 3

Disponibilité