Configure maintenance windows for automatic updates: registry value MaintenanceWindowEnabled and 16 moreComputerHKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
- Policy ID
- MaintenanceWindow
- Scope
- Computer Configuration
- Supported on
- At least Windows 11 Version 24H2
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Windows Components › Windows Update › Manage end user experience
Registry
MaintenanceWindowEnabled
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 "MaintenanceWindowEnabled"=dword:00000001 ; Disabled "MaintenanceWindowEnabled"=dword:00000000
CMD
:: Options (use only one) :: Enabled reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowEnabled" /t REG_DWORD /d 1 /f :: Disabled reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowEnabled" /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 'MaintenanceWindowEnabled' -PropertyType DWord -Value 1 -Force | Out-Null # Disabled New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowEnabled' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowUpdateActions
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Update actions only allowed inside the maintenance window:
| Item | Stored value |
|---|---|
| Download, install, and restart | 1 |
| Install and restart | 2 |
| Restart only | 3 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Download, install, and restart "MaintenanceWindowUpdateActions"=dword:00000001 ; Install and restart "MaintenanceWindowUpdateActions"=dword:00000002 ; Restart only "MaintenanceWindowUpdateActions"=dword:00000003
CMD
:: Options (use only one) :: Download, install, and restart reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowUpdateActions" /t REG_DWORD /d 1 /f :: Install and restart reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowUpdateActions" /t REG_DWORD /d 2 /f :: Restart only reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowUpdateActions" /t REG_DWORD /d 3 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # Options (use only one) # Download, install, and restart New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowUpdateActions' -PropertyType DWord -Value 1 -Force | Out-Null # Install and restart New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowUpdateActions' -PropertyType DWord -Value 2 -Force | Out-Null # Restart only New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowUpdateActions' -PropertyType DWord -Value 3 -Force | Out-Null
MaintenanceWindowStartDate
REG_SZComputer- Enabled value
- Depends on the option value
- Element
- Start date (Format: yyyy-mm-dd example: 2025-10-30)
- Value type
- REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "MaintenanceWindowStartDate"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowStartDate" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartDate' -PropertyType String -Value '<enter value>' -Force | Out-Null
MaintenanceWindowStartTime
REG_SZComputer- Enabled value
- Depends on the option value
- Element
- Start time (Format: hh:mm example: 23:30 for 11:30 PM)
- Value type
- REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "MaintenanceWindowStartTime"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowStartTime" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartTime' -PropertyType String -Value '<enter value>' -Force | Out-Null
MaintenanceWindowDurationHours
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Duration (hours):
- Value type
- REG_DWORD
- Required
- true
- Minimum value
- 2
- Maximum value
- 24
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "MaintenanceWindowDurationHours"=dword:<enter value>
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowDurationHours" /t REG_DWORD /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowDurationHours' -PropertyType DWord -Value '<enter value>' -Force | Out-Null
MaintenanceWindowRepeatScheduleOption
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Select repeat schedule:
| Item | Stored value |
|---|---|
| No repeat | 1 |
| Daily | 2 |
| Weekly | 3 |
| Monthly | 4 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; No repeat "MaintenanceWindowRepeatScheduleOption"=dword:00000001 ; Daily "MaintenanceWindowRepeatScheduleOption"=dword:00000002 ; Weekly "MaintenanceWindowRepeatScheduleOption"=dword:00000003 ; Monthly "MaintenanceWindowRepeatScheduleOption"=dword:00000004
CMD
:: Options (use only one) :: No repeat reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowRepeatScheduleOption" /t REG_DWORD /d 1 /f :: Daily reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowRepeatScheduleOption" /t REG_DWORD /d 2 /f :: Weekly reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowRepeatScheduleOption" /t REG_DWORD /d 3 /f :: Monthly reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowRepeatScheduleOption" /t REG_DWORD /d 4 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # Options (use only one) # No repeat New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -PropertyType DWord -Value 1 -Force | Out-Null # Daily New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -PropertyType DWord -Value 2 -Force | Out-Null # Weekly New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -PropertyType DWord -Value 3 -Force | Out-Null # Monthly New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -PropertyType DWord -Value 4 -Force | Out-Null
MaintenanceWindowWeeklySunday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Sunday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklySunday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklySunday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklySunday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklySunday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySunday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySunday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklyMonday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Monday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklyMonday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklyMonday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyMonday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyMonday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyMonday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyMonday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklyTuesday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Tuesday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklyTuesday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklyTuesday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyTuesday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyTuesday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyTuesday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyTuesday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklyWednesday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Wednesday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklyWednesday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklyWednesday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyWednesday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyWednesday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyWednesday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyWednesday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklyThursday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Thursday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklyThursday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklyThursday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyThursday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyThursday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyThursday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyThursday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklyFriday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Friday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklyFriday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklyFriday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyFriday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklyFriday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyFriday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyFriday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowWeeklySaturday
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Saturday
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Checked "MaintenanceWindowWeeklySaturday"=dword:00000001 ; Unchecked "MaintenanceWindowWeeklySaturday"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklySaturday" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowWeeklySaturday" /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) # Checked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySaturday' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySaturday' -PropertyType DWord -Value 0 -Force | Out-Null
MaintenanceWindowMonthlySchedule
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Monthly Schedule Type:
| Item | Stored value |
|---|---|
| Date-based | 1 |
| Week-based | 2 |
| Last day of the month | 3 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Date-based "MaintenanceWindowMonthlySchedule"=dword:00000001 ; Week-based "MaintenanceWindowMonthlySchedule"=dword:00000002 ; Last day of the month "MaintenanceWindowMonthlySchedule"=dword:00000003
CMD
:: Options (use only one) :: Date-based reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlySchedule" /t REG_DWORD /d 1 /f :: Week-based reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlySchedule" /t REG_DWORD /d 2 /f :: Last day of the month reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlySchedule" /t REG_DWORD /d 3 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # Options (use only one) # Date-based New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlySchedule' -PropertyType DWord -Value 1 -Force | Out-Null # Week-based New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlySchedule' -PropertyType DWord -Value 2 -Force | Out-Null # Last day of the month New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlySchedule' -PropertyType DWord -Value 3 -Force | Out-Null
MaintenanceWindowMonthlyMonthBasedDayOfMonth
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Day of the Month:
- Value type
- REG_DWORD
- Required
- true
- Minimum value
- 1
- Maximum value
- 28
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "MaintenanceWindowMonthlyMonthBasedDayOfMonth"=dword:<enter value>
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyMonthBasedDayOfMonth" /t REG_DWORD /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -PropertyType DWord -Value '<enter value>' -Force | Out-Null
MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Occurrence in Month
| Item | Stored value |
|---|---|
| First | 1 |
| Second | 2 |
| Third | 3 |
| Fourth | 4 |
| Last | 5 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; First "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000001 ; Second "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000002 ; Third "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000003 ; Fourth "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000004 ; Last "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000005
CMD
:: Options (use only one) :: First reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth" /t REG_DWORD /d 1 /f :: Second reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth" /t REG_DWORD /d 2 /f :: Third reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth" /t REG_DWORD /d 3 /f :: Fourth reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth" /t REG_DWORD /d 4 /f :: Last reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth" /t REG_DWORD /d 5 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # Options (use only one) # First New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -PropertyType DWord -Value 1 -Force | Out-Null # Second New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -PropertyType DWord -Value 2 -Force | Out-Null # Third New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -PropertyType DWord -Value 3 -Force | Out-Null # Fourth New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -PropertyType DWord -Value 4 -Force | Out-Null # Last New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -PropertyType DWord -Value 5 -Force | Out-Null
MaintenanceWindowMonthlyWeekBasedDayOfTheWeek
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Day of the Week
| Item | Stored value |
|---|---|
| Sunday | 1 |
| Monday | 2 |
| Tuesday | 3 |
| Wednesday | 4 |
| Thursday | 5 |
| Friday | 6 |
| Saturday | 7 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; Options (use only one) ; Sunday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000001 ; Monday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000002 ; Tuesday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000003 ; Wednesday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000004 ; Thursday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000005 ; Friday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000006 ; Saturday "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000007
CMD
:: Options (use only one) :: Sunday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 1 /f :: Monday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 2 /f :: Tuesday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 3 /f :: Wednesday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 4 /f :: Thursday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 5 /f :: Friday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 6 /f :: Saturday reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "MaintenanceWindowMonthlyWeekBasedDayOfTheWeek" /t REG_DWORD /d 7 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # Options (use only one) # Sunday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 1 -Force | Out-Null # Monday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 2 -Force | Out-Null # Tuesday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 3 -Force | Out-Null # Wednesday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 4 -Force | Out-Null # Thursday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 5 -Force | Out-Null # Friday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 6 -Force | Out-Null # Saturday New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -PropertyType DWord -Value 7 -Force | Out-Null