Specify deadline before auto-restart for update installation
Spécifier une date d’échéance avant le redémarrage automatique pour l’installation de la mise à jour
Explanation
Specify the deadline before the PC will automatically restart to apply updates. The deadline can be set 2 to 14 days past the default restart date.
The restart may happen inside active hours.
If you disable or do not configure this policy, the PC will restart according to the default schedule.
Enabling either of the following two policies will override the above policy:
1. No auto-restart with logged on users for scheduled automatic updates installations.
2. Always automatically restart at scheduled time.
Spécifiez la date d'échéance avant le redémarrage automatique du PC pour appliquer les mises à jour. La date d'échéance peut être définie entre 2 et 14 jours après la date de redémarrage par défaut.
Le redémarrage peut se produire dans les heures d'activité.
Si vous désactivez cette stratégie ou ne la configurez pas, le PC redémarrera en fonction de la planification par défaut.
L'activation de l'une des deux stratégies remplace la stratégie ci-dessus :
1. Pas de redémarrage automatique avec des utilisateurs connectés pour l'installations planifiée des mises à jour automatiques.
2. Toujours redémarrer automatiquement à l'heure planifiée.
Use cases
Sets between 2 and 14 days how long a pending post-install restart can wait before it is enforced (7 days by default, after which the user sees a restart-required notification). It served as a compliance deadline on Windows 10.
This setting is legacy and does not apply to Windows 11: use the quality-update compliance deadlines instead.
Microsoft source: Manage device restarts after updates
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate- Value name
SetAutoRestartDeadline
| 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/AutoRestartDeadline
$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 'SetAutoRestartDeadline' -Value 1 -Type DWord
# Quality Updates (days)
# Possible options:
# 2 = 2; 3 = 3; 4 = 4; 5 = 5; 6 = 6; 7 = 7; 8 = 8; 9 = 9; 10 = 10; 11 = 11; 12 = 12; 13 = 13
# 14 = 14; 15 = 15; 16 = 16; 17 = 17; 18 = 18; 19 = 19; 20 = 20; 21 = 21; 22 = 22; 23 = 23
# 24 = 24; 25 = 25; 26 = 26; 27 = 27; 28 = 28; 29 = 29; 30 = 30
Set-ItemProperty -Path $k -Name 'AutoRestartDeadlinePeriodInDays' -Value 7 -Type DWord
# Feature Updates (days)
# Possible options:
# 2 = 2; 3 = 3; 4 = 4; 5 = 5; 6 = 6; 7 = 7; 8 = 8; 9 = 9; 10 = 10; 11 = 11; 12 = 12; 13 = 13
# 14 = 14; 15 = 15; 16 = 16; 17 = 17; 18 = 18; 19 = 19; 20 = 20; 21 = 21; 22 = 22; 23 = 23
# 24 = 24; 25 = 25; 26 = 26; 27 = 27; 28 = 28; 29 = 29; 30 = 30
Set-ItemProperty -Path $k -Name 'AutoRestartDeadlinePeriodInDaysForFeatureUpdates' -Value 7 -Type DWordDisable
# Disable: WindowsUpdate/AutoRestartDeadline
$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 'SetAutoRestartDeadline' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsUpdate/AutoRestartDeadline
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
Remove-ItemProperty -Path $k -Name 'SetAutoRestartDeadline' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'AutoRestartDeadlinePeriodInDays' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'AutoRestartDeadlinePeriodInDaysForFeatureUpdates' -ErrorAction SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Quality Updates (days):Mises à jour de qualité (jours) :AutoRestartDeadline | Drop-down listenum | AutoRestartDeadlinePeriodInDays | REG_DWORD | Required · Default choice (UI): #5
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Feature Updates (days):Mises à jour des fonctionnalités (jours) :AutoRestartDeadlineForFeatureUpdates | Drop-down listenum | AutoRestartDeadlinePeriodInDaysForFeatureUpdates | REG_DWORD | Required · Default choice (UI): #5
|