Configure Scenario Execution Level
Configurer le niveau d’exécution des scénarios
Explanation
This policy setting determines whether Diagnostic Policy Service (DPS) diagnoses memory leak problems.
If you enable or do not configure this policy setting, the DPS enables Windows Memory Leak Diagnosis by default.
If you disable this policy setting, the DPS is not able to diagnose memory leak problems.
This policy setting takes effect only under the following conditions:
-- If the diagnostics-wide scenario execution policy is not configured.
-- When the Diagnostic Policy Service is in the running state. When the service is stopped or disabled, diagnostic scenarios are not executed.
Note: The DPS can be configured with the Services snap-in to the Microsoft Management Console.
No operating system restart or service restart is required for this policy to take effect. Changes take effect immediately.
Ce paramètre de stratégie détermine si le service de stratégie de diagnostic doit diagnostiquer les problèmes de fuite de mémoire.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, le service de stratégie de diagnostic active par défaut la fonction de diagnostic de fuite de mémoire Windows.
Si vous désactivez ce paramètre de stratégie, le service de stratégie de diagnostic ne peut pas diagnostiquer les problèmes de fuite de mémoire.
Ce paramètre de stratégie ne prend effet que dans les conditions suivantes :
- La stratégie d’exécution des scénarios de diagnostic n’est pas configurée.
- Le service de stratégie de diagnostic est en cours d’exécution. Lorsque le service est arrêté ou désactivé, les scénarios de diagnostic ne sont pas exécutés.
Remarque : le service de stratégie de diagnostic peut être configuré avec le composant logiciel enfichable Services dans la console MMC (Microsoft Management Console).
Aucun redémarrage du système d’exploitation ou d’un service n’est nécessaire pour rendre ce paramètre de stratégie effectif. Les modifications sont appliquées immédiatement.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{eb73b633-3f4e-4ba0-8f60-8f3c6f53168f}- Value name
- not defined in the ADMX
| State | Value written | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Enabled |
| |||||||||
| Disabled |
|
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: LeakDiagnostic/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{eb73b633-3f4e-4ba0-8f60-8f3c6f53168f}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -Value 2 -Type DWordDisable
# Disable: LeakDiagnostic/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{eb73b633-3f4e-4ba0-8f60-8f3c6f53168f}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 0 -Type DWord
Set-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": LeakDiagnostic/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{eb73b633-3f4e-4ba0-8f60-8f3c6f53168f}'
Remove-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -ErrorAction SilentlyContinue