Open in the explorer

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

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/AutoRestartDeadline

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.

French text from Windows 11 26H2

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
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/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 DWord

Disable

# 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 DWord

Revert 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 SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Quality Updates (days):Mises à jour de qualité (jours) :AutoRestartDeadlineDrop-down listenumAutoRestartDeadlinePeriodInDaysREG_DWORD
Required · Default choice (UI): #5
LabelValue
2REG_DWORD = 2
3REG_DWORD = 3
4REG_DWORD = 4
5REG_DWORD = 5
6REG_DWORD = 6
7REG_DWORD = 7
8REG_DWORD = 8
9REG_DWORD = 9
10REG_DWORD = 10
11REG_DWORD = 11
12REG_DWORD = 12
13REG_DWORD = 13
14REG_DWORD = 14
15REG_DWORD = 15
16REG_DWORD = 16
17REG_DWORD = 17
18REG_DWORD = 18
19REG_DWORD = 19
20REG_DWORD = 20
21REG_DWORD = 21
22REG_DWORD = 22
23REG_DWORD = 23
24REG_DWORD = 24
25REG_DWORD = 25
26REG_DWORD = 26
27REG_DWORD = 27
28REG_DWORD = 28
29REG_DWORD = 29
30REG_DWORD = 30
Feature Updates (days):Mises à jour des fonctionnalités (jours) :AutoRestartDeadlineForFeatureUpdatesDrop-down listenumAutoRestartDeadlinePeriodInDaysForFeatureUpdatesREG_DWORD
Required · Default choice (UI): #5
LabelValue
2REG_DWORD = 2
3REG_DWORD = 3
4REG_DWORD = 4
5REG_DWORD = 5
6REG_DWORD = 6
7REG_DWORD = 7
8REG_DWORD = 8
9REG_DWORD = 9
10REG_DWORD = 10
11REG_DWORD = 11
12REG_DWORD = 12
13REG_DWORD = 13
14REG_DWORD = 14
15REG_DWORD = 15
16REG_DWORD = 16
17REG_DWORD = 17
18REG_DWORD = 18
19REG_DWORD = 19
20REG_DWORD = 20
21REG_DWORD = 21
22REG_DWORD = 22
23REG_DWORD = 23
24REG_DWORD = 24
25REG_DWORD = 25
26REG_DWORD = 26
27REG_DWORD = 27
28REG_DWORD = 28
29REG_DWORD = 29
30REG_DWORD = 30

Availability