整理相關設定如下.
1.先確認該 Server 是 獨立伺服器(未加入網域) 或 網域伺服器
2.如為網域伺服器,請在 cmd 中,執行下列command(此為一整行,請小心 copy)
net stop w32time && w32tm /unregister && w32tm /register && net start w32time && w32tm /resync && w32tm /dumpreg /subkey:Parameters && w32tm /dumpreg /subkey:TimeProviders\NtpClient && w32tm /stripchart /computer:xxx.xxx.xxx.xxx /samples:30 /dataonly
3.如為獨立伺服器,請在 cmd 中,執行下列command(此為一整行,請小心 copy)
net stop w32time && w32tm /unregister && w32tm /register && net time /setsntp:xxx.xxx.xxx.xxx
&& net start w32time && w32tm /resync && w32tm /dumpreg /subkey:Parameters && w32tm /dumpreg /subkey:TimeProviders\NtpClient && w32tm /stripchart /computer:xxx.xxx.xxx.xxx/samples:30 /dataonly
說明
net stop w32time --停止 ntp 服務
w32tm /unregister --清除 ntp 設定
w32tm /register --還原預設初時值
net time /setsntp:xxx.xxx.xxx.xxx --獨立Server時,強制設定 ntp server 為 xxx.xxx.xxx.xxx
net start w32time --啟動 ntp 服務
w32tm /resync --執行校時
w32tm /dumpreg /subkey:Parameters --Show ntp 設定值
以上 Parameters 請注意
ValueName:Type
--> ValueDate:NT5DS
w32tm /dumpreg /subkey:TimeProviders\NtpClient --Show ntp 設定值
以上 NtpClient 請注意
ValueName:Enabled
-->ValueData:1(啟用 ntp 校時)
ValueName:SpecialPollInterval
-->ValueDate:3600(每3600 Sec 校時乙次)
w32tm /stripchart /computer:xxx.xxx.xxx.xxx /samples:30 /dataonly --Show ntp 校時狀態
PS:許多相關設定及用法,在此並未詳細說明,如有興趣請參考下列資料
參考資料
http://blog.miniasp.com/post/2009/06/16/Configure-the-Windows-Time-service-on-the-Domain-Controller.aspx
http://blog.miniasp.com/post/2009/06/08/How-to-adjust-Time-using-Windows-Time-Service.aspx
http://www.dotblogs.com.tw/tigerlin/archive/2009/06/08/8726.aspx
http://support.microsoft.com/kb/816042/zh-tw
http://support.microsoft.com/kb/884776/zh-tw
http://technet.microsoft.com/en-us/library/bb491016.aspx
http://technet.microsoft.com/en-us/library/cc773263(WS.10).aspx
http://technet.microsoft.com/zh-tw/library/cc773263.aspx
http://tw.myblog.yahoo.com/wonderful-reminiscence