設定更新的自動重新啟動警告通知排程 的登錄值 SetRestartWarningSchd 等 2 個電腦HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
- 原則 ID
- RestartWarnRemind
- 適用範圍
- 電腦設定
- 支援的作業系統
- Windows Server 2016 (經由 Windows Server 2022) 或 Windows 10
- 來源
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
- 類別
- Windows 元件 › Windows Update › 舊版原則
登錄
SetRestartWarningSchd
REG_DWORD電腦- 啟用時的值
- 1
- 停用時的值
- 0
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; 選項 (只使用其中一個) ; 已啟用 "SetRestartWarningSchd"=dword:00000001 ; 已停用 "SetRestartWarningSchd"=dword:00000000
CMD
:: 選項 (只使用其中一個) :: 已啟用 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "SetRestartWarningSchd" /t REG_DWORD /d 1 /f :: 已停用 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "SetRestartWarningSchd" /t REG_DWORD /d 0 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # 選項 (只使用其中一個) # 已啟用 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetRestartWarningSchd' -PropertyType DWord -Value 1 -Force | Out-Null # 已停用 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetRestartWarningSchd' -PropertyType DWord -Value 0 -Force | Out-Null
ScheduleRestartWarning
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- 提醒 (小時):
| 項目 | 儲存的值 |
|---|---|
| 2 | 2 |
| 4 | 4 |
| 8 | 8 |
| 12 | 12 |
| 24 | 24 |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; 選項 (只使用其中一個) ; 2 "ScheduleRestartWarning"=dword:00000002 ; 4 "ScheduleRestartWarning"=dword:00000004 ; 8 "ScheduleRestartWarning"=dword:00000008 ; 12 "ScheduleRestartWarning"=dword:0000000c ; 24 "ScheduleRestartWarning"=dword:00000018
CMD
:: 選項 (只使用其中一個) :: 2 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleRestartWarning" /t REG_DWORD /d 2 /f :: 4 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleRestartWarning" /t REG_DWORD /d 4 /f :: 8 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleRestartWarning" /t REG_DWORD /d 8 /f :: 12 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleRestartWarning" /t REG_DWORD /d 12 /f :: 24 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleRestartWarning" /t REG_DWORD /d 24 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # 選項 (只使用其中一個) # 2 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleRestartWarning' -PropertyType DWord -Value 2 -Force | Out-Null # 4 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleRestartWarning' -PropertyType DWord -Value 4 -Force | Out-Null # 8 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleRestartWarning' -PropertyType DWord -Value 8 -Force | Out-Null # 12 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleRestartWarning' -PropertyType DWord -Value 12 -Force | Out-Null # 24 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleRestartWarning' -PropertyType DWord -Value 24 -Force | Out-Null
ScheduleImminentRestartWarning
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- 警告 (分鐘):
| 項目 | 儲存的值 |
|---|---|
| 15 | 15 |
| 30 | 30 |
| 60 | 60 |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate] ; 選項 (只使用其中一個) ; 15 "ScheduleImminentRestartWarning"=dword:0000000f ; 30 "ScheduleImminentRestartWarning"=dword:0000001e ; 60 "ScheduleImminentRestartWarning"=dword:0000003c
CMD
:: 選項 (只使用其中一個) :: 15 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleImminentRestartWarning" /t REG_DWORD /d 15 /f :: 30 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleImminentRestartWarning" /t REG_DWORD /d 30 /f :: 60 reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ScheduleImminentRestartWarning" /t REG_DWORD /d 60 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Force | Out-Null # 選項 (只使用其中一個) # 15 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleImminentRestartWarning' -PropertyType DWord -Value 15 -Force | Out-Null # 30 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleImminentRestartWarning' -PropertyType DWord -Value 30 -Force | Out-Null # 60 New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ScheduleImminentRestartWarning' -PropertyType DWord -Value 60 -Force | Out-Null