XP/Vista/Server 2003 內建了NTP Client,其實 Windows 2000 也是有內建 NTP Client Service 的
那麼沒有加入網域或是主控站本身呢?...就要自行手動設定欲同步的 NTP Server

1. 先停止 W32Time Service。
net stop w32time

2. 設定校時用的伺服器
net time /setsntp:"time.windows.com time.stdtime.gov.tw"

3. 進行第一次的時間校時以便驗證
w32tm -once

4. 設定往後多久校時一次,以下是設定45分鐘內取得3次的時間,選擇一個最好的時間,並且每天執行 (Default 間隔為每天一次)
w32tm -period 65531

5. 重新啟動 W32Time Service
net start w32time

基本上完成前述五項步驟即可完成校時 NTP 設定,其他參數可以參考下面所列

Net time [\\\\computername | /DOMAIN:domainname]
/RTSDOMAIN[:domainname] [/set]
\\\\computername /querysntp
\\\\computername /setsntp[:ntp server list]

net time
net time \\\\computername

net time /domain:domainname

net time /domain /set
net time /rtsdomain:domainname
顯示指定網域的時間伺服器之時間 (並不需要真的有一台可靠的時間伺服器)

net time /querysntp
net time /setsntp:ntpserver
手動set欲同步的校時伺服器(IP or DN)

net time /setsntp

W32tm [-tz | -s [computer] | -adj | -adjoff | -source | -once] [-test]
[-v] [-p port] [-period freq]


 Prints the local time zone information and exit.

-s computer

 Forces computer (or the local computer if none is specified) to resynchronize, then exits.


 Sets the computer's system clock frequency to the last frequency determined during synchronization, then exits.


 Sets the computer's system clock frequency as the system default, then exits.


 Chooses a synchronization source, then exits. Note that you choose a source before each synchronization, so this is useful only in showing that a source cannot be found.


 Synchronizes once, and then exits. Otherwise, runs continuously as a client, synchronizing the local clock until ctrl-c is pressed.

 Prevents the time on the local system from being modified.


 Prints out a detailed description of what the program is doing. This is usually needed because otherwise the program produces no output. The exceptions are -s and -tz.

-p port

 Sets the server port.

-period freq

 Sets the sync period just as in the registry. (For more information, see \"W32Time Registry Entries\" later in this article). That is:
0 = once per day
65535 = once every two days
65534 = once every three days
65533 = once every week (seven days)
65532 = once every 45 minutes until you get three good
syncs, then once every eight hours (three/day)
65531 = once every 45 minutes until you get one good
sync, then once every day
Otherwise freq specifies the number of times per day. If you choose to add a value other than any of those specified above, you must use this option.



創作者 parrotchang 的頭像


parrotchang 發表在 痞客邦 留言(0) 人氣()