en-US windows computer

Specify deadline before auto-restart for update installation

Verified with Windows 11 25H2 — updated on July 30, 2026

Windows 11 25H2

Supported on: Windows Server 2016 through Windows Server 2022, or Windows 10​

Path in the GPO console

Computer Configuration\Administrative Templates\Windows Components\Windows Update\Legacy Policies

Description

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.

Registry

HKLM Software\Policies\Microsoft\Windows\WindowsUpdate

Value name: SetAutoRestartDeadline

Enabled: SetAutoRestartDeadline = 1

Disabled: SetAutoRestartDeadline = 0

More options available

Options

Quality Updates (days):
AutoRestartDeadlinePeriodInDays enum
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7 (default)
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
Feature Updates (days):
AutoRestartDeadlinePeriodInDaysForFeatureUpdates enum
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7 (default)
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

MDM / Intune (CSP)

./Device/Vendor/MSFT/Policy/Config/Update/AutoRestartDeadlinePeriodInDays
Device Since Windows 10, version 1607 [10.0.14393] and later Official mapping (Microsoft Learn)

Multiple CSP matches are possible; the first one was selected.

Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Specify deadline before auto-restart for update installation
; State: Enabled
; Supported on: Windows Server 2016 through Windows Server 2022, or Windows 10​

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]
"SetAutoRestartDeadline"=dword:00000001
"AutoRestartDeadlinePeriodInDays"=dword:00000007
"AutoRestartDeadlinePeriodInDaysForFeatureUpdates"=dword:00000007
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Specify deadline before auto-restart for update installation
# State: Enabled
# Supported on: Windows Server 2016 through Windows Server 2022, or Windows 10​

$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetAutoRestartDeadline' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'AutoRestartDeadlinePeriodInDays' -Value 7 -Type DWord
Set-ItemProperty -Path $path -Name 'AutoRestartDeadlinePeriodInDaysForFeatureUpdates' -Value 7 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview