2012年1月17日 星期二

Windows 時間同步 w32tm

Windows 時間同步 w32tm

http://www.dotblogs.com.tw/tigerlin/archive/2009/06/08/8726.aspx
http://support.microsoft.com/kb/307897/zh-tw
http://blog.miniasp.com/post/2009/06/16/Configure-the-Windows-Time-service-on-the-Domain-Controller.aspx

設定要同步的 NTP Server
w32tm /config /update /manualpeerlist:網址或IP

開始進行同步
w32tm /resync

寫成 bat 檔.

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

沒有留言:

張貼留言