Specify active hours range for auto-restarts: registry value SetActiveHoursMaxRange and 1 moreComputerHKLM\Software\Policies\Microsoft\Windows\WindowsUpdate

Policy ID
ActiveHoursMaxRange
Scope
Computer Configuration
Supported on
At least Windows Server 2016 or Windows 10
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Windows Update › Manage end user experience

Registry

SetActiveHoursMaxRange

REG_DWORDComputer
Enabled value
1
Disabled value
0
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]

; Options (use only one)
; Enabled
"SetActiveHoursMaxRange"=dword:00000001
; Disabled
"SetActiveHoursMaxRange"=dword:00000000
CMD
:: Options (use only one)

:: Enabled
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "SetActiveHoursMaxRange" /t REG_DWORD /d 1 /f
:: Disabled
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "SetActiveHoursMaxRange" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null

# Options (use only one)
# Enabled
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetActiveHoursMaxRange' -PropertyType DWord -Value 1 -Force | Out-Null
# Disabled
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetActiveHoursMaxRange' -PropertyType DWord -Value 0 -Force | Out-Null

ActiveHoursMaxRange

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Max range:
Options
ItemStored value
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]

; Options (use only one)
; 8
"ActiveHoursMaxRange"=dword:00000008
; 9
"ActiveHoursMaxRange"=dword:00000009
; 10
"ActiveHoursMaxRange"=dword:0000000a
; 11
"ActiveHoursMaxRange"=dword:0000000b
; 12
"ActiveHoursMaxRange"=dword:0000000c
; 13
"ActiveHoursMaxRange"=dword:0000000d
; 14
"ActiveHoursMaxRange"=dword:0000000e
; 15
"ActiveHoursMaxRange"=dword:0000000f
; 16
"ActiveHoursMaxRange"=dword:00000010
; 17
"ActiveHoursMaxRange"=dword:00000011
; 18
"ActiveHoursMaxRange"=dword:00000012
CMD
:: Options (use only one)

:: 8
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 8 /f
:: 9
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 9 /f
:: 10
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 10 /f
:: 11
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 11 /f
:: 12
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 12 /f
:: 13
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 13 /f
:: 14
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 14 /f
:: 15
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 15 /f
:: 16
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 16 /f
:: 17
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 17 /f
:: 18
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursMaxRange" /t REG_DWORD /d 18 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null

# Options (use only one)
# 8
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 8 -Force | Out-Null
# 9
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 9 -Force | Out-Null
# 10
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 10 -Force | Out-Null
# 11
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 11 -Force | Out-Null
# 12
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 12 -Force | Out-Null
# 13
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 13 -Force | Out-Null
# 14
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 14 -Force | Out-Null
# 15
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 15 -Force | Out-Null
# 16
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 16 -Force | Out-Null
# 17
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 17 -Force | Out-Null
# 18
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ActiveHoursMaxRange' -PropertyType DWord -Value 18 -Force | Out-Null