Configure Scheduled Maintenance Behavior
Supported on: At least Windows Server 2008 R2 or Windows 7
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics |
|---|---|
| Value name | EnabledExecution |
| Enabled writes | 1 (REG_DWORD) |
| Disabled writes | 0 (REG_DWORD) |
| Option | Value | Type | Allowed values |
|---|---|---|---|
| Execution Level | EnabledExecutionLevel | 1 (REG_DWORD) = Troubleshooting Only 2 (REG_DWORD) = Regular |
What it does (vendor 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.
Group Policy path: Computer Configuration > Administrative Templates > System > Troubleshooting and Diagnostics > Scheduled Maintenance > Configure Scheduled Maintenance Behavior
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics' -Name 'EnabledExecution' -Value 1 -PropertyType DWord -Force
# Execution Level
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\ScheduledDiagnostics' -Name 'EnabledExecutionLevel' -Value 1 -PropertyType DWord -ForceGroup Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".