Open in the explorer

Configure Scheduled Maintenance Behavior

Configurer le comportement de la maintenance planifiée

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Troubleshooting and Diagnostics › Scheduled Maintenance FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Dépannage et diagnostics › Maintenance planifiée
Supported on
At least Windows Server 2008 R2 or Windows 7 FR: Au minimum Windows Server 2008 R2 ou Windows 7
ADMX file
sdiagschd.admx
Internal name
sdiagschd/ScheduledDiagnosticsExecutionPolicy

Explanation

Determines whether scheduled diagnostics will run to proactively detect and resolve system problems.

If you enable this policy setting, you must choose an execution level. If you choose detection and troubleshooting only, Windows will periodically detect and troubleshoot problems. The user will be notified of the problem for interactive resolution.

If you choose detection, troubleshooting and resolution, Windows will resolve some of these problems silently without requiring user input.

If you disable this policy setting, Windows will not be able to detect, troubleshoot or resolve problems on a scheduled basis.

If you do not configure this policy setting, local troubleshooting preferences will take precedence, as configured in the control panel. If no local troubleshooting preference is configured, scheduled diagnostics are enabled for detection, troubleshooting and resolution by default.

No reboots or service restarts are required for this policy to take effect: changes take effect immediately.

This policy setting will only take effect when the Task Scheduler service is in the running state. When the service is stopped or disabled, scheduled diagnostics will not be executed. The Task Scheduler service can be configured with the Services snap-in to the Microsoft Management Console.

French text from Windows 11 26H2

Détermine si les diagnostics planifiés seront exécutés afin de détecter et de résoudre, de façon proactive, les problèmes liés au système.

Si vous activez ce paramètre de stratégie, vous devez choisir un niveau d'exécution. Si vous optez pour la détection et le dépannage seulement, Windows vérifiera les erreurs de dysfonctionnement de façon périodique. Les problèmes détectés seront signalés à l'utilisateur en vue d'une résolution interactive.

Si vous optez pour la détection, le dépannage et la résolution, Windows se chargera de trouver une solution aux problèmes sans demander l'intervention de l'utilisateur.

Si vous désactivez ce paramètre de stratégie, Windows ne sera pas en mesure de détecter et de résoudre les problèmes avec ou sans votre intervention selon le calendrier prévu.

Si vous ne configurez pas ce paramètre de stratégie, les préférences en matière de dépannage local (telles qu'elles sont définies dans le Panneau de configuration) seront prioritaires. Si aucune préférence de ce type n'est configurée, les diagnostics planifiés sont activés pour assurer la détection et la résolution des problèmes par défaut.

Il n'est pas nécessaire de redémarrer l'ordinateur ou les services appropriés pour que cette stratégie soit prise en compte : les modifications prennent effet immédiatement.

Ce paramètre de stratégie est appliqué à condition que le service Planificateur de tâches soit en cours d'exécution. En cas d'arrêt ou de désactivation de ce service, les diagnostics planifiés ne sont pas exécutés. Le service Planificateur de tâches peut être configuré au moyen du composant logiciel enfichable Services dans Microsoft Management Console.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics
Value name
EnabledExecution
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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: sdiagschd/ScheduledDiagnosticsExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnabledExecution' -Value 1 -Type DWord
# Execution Level
# Possible options:
#   Troubleshooting Only = 1
#   Regular = 2
Set-ItemProperty -Path $k -Name 'EnabledExecutionLevel' -Value 2 -Type DWord

Disable

# Disable: sdiagschd/ScheduledDiagnosticsExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnabledExecution' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": sdiagschd/ScheduledDiagnosticsExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics'
Remove-ItemProperty -Path $k -Name 'EnabledExecution' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnabledExecutionLevel' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Execution LevelNiveau d'exécutionScheduledDiagnosticsExecutionPolicyLevelDrop-down listenumEnabledExecutionLevelREG_DWORD
Required · Default choice (UI): #1
LabelValue
Troubleshooting OnlyREG_DWORD = 1
RegularREG_DWORD = 2

Availability