設定 Windows NTP 用戶端 的登錄值 NtpServer 等 1 個 (Parameters)電腦HKLM\Software\Policies\Microsoft\W32time\Parameters
- 原則 ID
- W32TIME_POLICY_CONFIGURE_NTPCLIENT
- 適用範圍
- 電腦設定
- 支援的作業系統
- 至少需要 Windows Server 2003 作業系統或 Windows XP Professional
- 來源
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
- 類別
- 系統 › Windows 時間服務 › 時間提供者
登錄
NtpServer
REG_SZ電腦- 啟用時的值
- 取決於選項值
- 元素
- NtpServer
- 值類型
- REG_SZ
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\Parameters] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "NtpServer"="<輸入值>"
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\Parameters" /v "NtpServer" /t REG_SZ /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Name 'NtpServer' -PropertyType String -Value '<輸入值>' -Force | Out-Null
Type
REG_SZ電腦- 啟用時的值
- 取決於選項值
- 元素
- Type
| 項目 | 儲存的值 |
|---|---|
| NoSync | NoSync |
| NTP | NTP |
| NT5DS | NT5DS |
| AllSync | AllSync |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\Parameters] ; 選項 (只使用其中一個) ; NoSync "Type"="NoSync" ; NTP "Type"="NTP" ; NT5DS "Type"="NT5DS" ; AllSync "Type"="AllSync"
CMD
:: 選項 (只使用其中一個) :: NoSync reg add "HKLM\Software\Policies\Microsoft\W32time\Parameters" /v "Type" /t REG_SZ /d "NoSync" /f :: NTP reg add "HKLM\Software\Policies\Microsoft\W32time\Parameters" /v "Type" /t REG_SZ /d "NTP" /f :: NT5DS reg add "HKLM\Software\Policies\Microsoft\W32time\Parameters" /v "Type" /t REG_SZ /d "NT5DS" /f :: AllSync reg add "HKLM\Software\Policies\Microsoft\W32time\Parameters" /v "Type" /t REG_SZ /d "AllSync" /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Force | Out-Null # 選項 (只使用其中一個) # NoSync New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Name 'Type' -PropertyType String -Value 'NoSync' -Force | Out-Null # NTP New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Name 'Type' -PropertyType String -Value 'NTP' -Force | Out-Null # NT5DS New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Name 'Type' -PropertyType String -Value 'NT5DS' -Force | Out-Null # AllSync New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\Parameters' -Name 'Type' -PropertyType String -Value 'AllSync' -Force | Out-Null
CrossSiteSyncFlags
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- CrossSiteSyncFlags
- 值類型
- REG_DWORD
- 最大值
- 2
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "CrossSiteSyncFlags"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient" /v "CrossSiteSyncFlags" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Name 'CrossSiteSyncFlags' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null
ResolvePeerBackoffMinutes
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- ResolvePeerBackoffMinutes
- 值類型
- REG_DWORD
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "ResolvePeerBackoffMinutes"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient" /v "ResolvePeerBackoffMinutes" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Name 'ResolvePeerBackoffMinutes' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null
ResolvePeerBackoffMaxTimes
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- ResolvePeerBackoffMaxTimes
- 值類型
- REG_DWORD
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "ResolvePeerBackoffMaxTimes"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient" /v "ResolvePeerBackoffMaxTimes" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Name 'ResolvePeerBackoffMaxTimes' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null
SpecialPollInterval
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- SpecialPollInterval
- 值類型
- REG_DWORD
- 最大值
- 131072
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "SpecialPollInterval"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient" /v "SpecialPollInterval" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Name 'SpecialPollInterval' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null
EventLogFlags
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- EventLogFlags
- 值類型
- REG_DWORD
- 最大值
- 3
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient] ; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> "EventLogFlags"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> reg add "HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient" /v "EventLogFlags" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值> New-Item -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Force | Out-Null New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient' -Name 'EventLogFlags' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null