Always automatically restart at the scheduled time
Toujours redémarrer automatiquement à l’heure planifiée
Explanation
If you enable this policy, a restart timer will always begin immediately after Windows Update installs important updates, instead of first notifying users on the login screen for at least two days.
The restart timer can be configured to start with any value from 15 to 180 minutes. When the timer runs out, the restart will proceed even if the PC has signed-in users.
If you disable or do not configure this policy, Windows Update will not alter its restart behavior.
If the "No auto-restart with logged on users for scheduled automatic updates installations" policy is enabled, then this policy has no effect.
Si vous activez cette stratégie, un minuteur de redémarrage commence toujours immédiatement après que Windows Update a installé des mises à jour importantes, au lieu d’informer d’abord les utilisateurs dans l’écran de connexion pendant au moins deux jours.
Le minuteur de redémarrage peut être configuré pour démarrer avec une valeur comprise entre 15 et 180 minutes. À l’expiration du délai d’attente, le redémarrage est effectué même si des utilisateurs sont connectés sur le PC.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, Windows Update ne modifie pas son comportement de redémarrage.
Si la stratégie « Pas de redémarrage automatique avec des utilisateurs connectés pour les installations planifiées de mises à jour automatiques » est activée, cette stratégie n’a aucun effet.
Use cases
Forces a restart countdown (15 to 180 minutes) as soon as important updates are installed, which guarantees machines eventually restart in the planned window. Useful on shared PCs or kiosks that stay signed in.
It is ignored if No auto-restart with logged on users is enabled, and only works with scheduling option 4.
Microsoft source: Step 4: Configure Group Policy settings for automatic updates
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU- Value name
AlwaysAutoRebootAtScheduledTime
| 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/AlwaysAutoRebootAtScheduledTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AlwaysAutoRebootAtScheduledTime' -Value 1 -Type DWord
# work (minutes)
Set-ItemProperty -Path $k -Name 'AlwaysAutoRebootAtScheduledTimeMinutes' -Value 15 -Type DWord # between 15 and 180Disable
# Disable: WindowsUpdate/AlwaysAutoRebootAtScheduledTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AlwaysAutoRebootAtScheduledTime' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsUpdate/AlwaysAutoRebootAtScheduledTime
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
Remove-ItemProperty -Path $k -Name 'AlwaysAutoRebootAtScheduledTime' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'AlwaysAutoRebootAtScheduledTimeMinutes' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| work (minutes):travail (minutes) :AlwaysAutoRebootAtScheduledTime_Minutes | Numeric boxdecimal | AlwaysAutoRebootAtScheduledTimeMinutes | REG_DWORD | Required · Min: 15 · Max: 180 · Default (UI): 15 |