Open in the explorer

Configure auto-restart warning notifications schedule for updates

Configurer le redémarrage automatique des notifications d’avertissement prévues pour les mises à jour

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Windows Update › Legacy Policies FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Windows Update › Stratégies héritées
Supported on
Windows Server 2016 through Windows Server 2022, or Windows 10​ FR: Windows Server 2016 via Windows Server 2022 ou Windows 10
ADMX file
WindowsUpdate.admx
Internal name
WindowsUpdate/RestartWarnRemind

Explanation

Enable this policy to control when notifications are displayed to warn users about a scheduled restart for the update installation deadline. Users are not able to postpone the scheduled restart once the deadline has been reached and the restart is automatically executed.

Specifies the amount of time prior to a scheduled restart to display the warning reminder to the user.

You can specify the amount of time prior to a scheduled restart to notify the user that the auto restart is imminent to allow them time to save their work.

If you disable or do not configure this policy, the default notification behaviors will be used.

French text from Windows 11 26H2

Autorisez cette stratégie à contrôler le moment où les notifications sont affichées pour avertir les utilisateurs d’un redémarrage planifié pour la date d’échéance d’installation de la mise à jour. Les utilisateurs ne sont pas habilités à reporter le redémarrage planifié une fois que la date d’échéance a été atteinte, et le redémarrage est exécuté automatiquement.

Spécifie la durée précédant un redémarrage planifié pour afficher le rappel d’avertissement auprès de l’utilisateur.

Vous pouvez spécifier la durée avant un redémarrage planifié pour notifier à l’utilisateur que le redémarrage automatique est imminent afin de lui laisser le temps d’enregistrer son travail.

Si vous désactivez cette stratégie ou si vous ne la configurez pas, les comportements par défaut des notifications seront utilisés.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
Value name
SetRestartWarningSchd
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: WindowsUpdate/RestartWarnRemind
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SetRestartWarningSchd' -Value 1 -Type DWord
# Reminder (hours)
# Possible options:
#   2 = 2
#   4 = 4
#   8 = 8
#   12 = 12
#   24 = 24
Set-ItemProperty -Path $k -Name 'ScheduleRestartWarning' -Value 4 -Type DWord
# Warning (mins)
# Possible options:
#   15 = 15
#   30 = 30
#   60 = 60
Set-ItemProperty -Path $k -Name 'ScheduleImminentRestartWarning' -Value 15 -Type DWord

Disable

# Disable: WindowsUpdate/RestartWarnRemind
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SetRestartWarningSchd' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WindowsUpdate/RestartWarnRemind
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
Remove-ItemProperty -Path $k -Name 'SetRestartWarningSchd' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ScheduleRestartWarning' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ScheduleImminentRestartWarning' -ErrorAction SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Reminder (hours):Rappel (heures) :RestartWarnRemindDrop-down listenumScheduleRestartWarningREG_DWORD
Required · Default choice (UI): #1
LabelValue
2REG_DWORD = 2
4REG_DWORD = 4
8REG_DWORD = 8
12REG_DWORD = 12
24REG_DWORD = 24
Warning (mins):Avertissement (minutes) :RestartWarnDrop-down listenumScheduleImminentRestartWarningREG_DWORD
Required · Default choice (UI): #0
LabelValue
15REG_DWORD = 15
30REG_DWORD = 30
60REG_DWORD = 60

Availability