Configure auto-restart warning notifications schedule for updates
Configurer le redémarrage automatique des notifications d’avertissement prévues pour les mises à jour
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.
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
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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 DWordDisable
# 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 DWordRevert 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 SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reminder (hours):Rappel (heures) :RestartWarnRemind | Drop-down listenum | ScheduleRestartWarning | REG_DWORD | Required · Default choice (UI): #1
| ||||||||||||
| Warning (mins):Avertissement (minutes) :RestartWarn | Drop-down listenum | ScheduleImminentRestartWarning | REG_DWORD | Required · Default choice (UI): #0
|