========================================================================
W32tm
A tool used to diagnose problems occurring with Windows Time
Syntax
{/config [/computer:ComputerName] [ [/update] [/manualpeerlist:ListOfComputerNames] ] [/syncfromflags:ListOfFlags] ]|/monitor|/ntte|/ntpte|/register|/resync [{:ComputerName] [/nowait]|[/rediscover}]|/tz|/unregister}
Parameters
/config [ /computer: ComputerName ] [ [ /update ] [ /manualpeerlist: ListOfComputerNames ] ] [ /syncfromflags: ListOfFlags ] : Adjusts the time settings on the local or target computer. Time synchronization peers can be set with the /manualpeerlist switch. Changes to configuration are not used by Windows Time unless the service is restarted or the /update switch is used. /syncfromflags can be used to set the types of sources used for synchronization, and can be set to either MANUAL to use the manual peer list or DOMHIER to synchronize from a domain controller.
/monitor : Monitors the target computer or list of computers.
/ntte : Converts an NT system time into a readable format.
/ntpte : Converts an NTP time into a readable format.
/register : Register to run as a service and add default configuration to the registry.
/resync [{ : ComputerName ] [ /nowait ]|[ /rediscover }] : Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize. The command will wait for resynchronization unless the/nowait switch is used. Currently used time resources will be used unless /rediscover is used, which will force redetection of network resourced before resynchronization.
/ tz : Display the current time zone settings.
/ unregister : Unregister service and remove all configuration information from the registry.
/? : Displays help at the command prompt.
Remarks
- This tool is designed for network administrators to use for diagnosing problems with Windows Time.For more information, see net time in Related Topics.
- For the Windows Time service to use the changed made with W32tm, it must be notified of the changes. To notify Windows Time, at the command prompt, type w32tm /config /update.
Examples
To display the current time zone settings, type:
w32tm /tz
Reference: MSDN
中文
========================================================================
網路校時是個很常用的工具,以下附上一些較常用的資訊供讀者參考:
1. 可以透過 cmd 下輸入 "w32tm /dumpreg /subkey:Config",去查看現在網路校時的設定
介紹一下其中兩個參數的意思,
1-1 MaxNegPhaseCorrection:此參數為負差校正,若網路時間比本地時間慢,慢的數值超過此值,即不自動校正。
1-2 MaxPosPhaseCorrection:此參數為正差校正,若網路時間比本地時間快,快的數值超過此值,即不自動校正。
此兩個數值可以在 Registry 內做更改,Registry 位置在 "HKey_Local_MACHINE\SYSTEM\CurrentControlSet\Service\W32Time\Config"。
更改完後,需在 cmd 下輸入 "w32tm /config /update"去更新組態,再輸入 "w32tm /resync"去重新網路校時。
沒有留言:
張貼留言