用net time 指令是否可做為確認自已是找誰做時間同步的依據?

Net time has nothing to do with W32time. It uses RPC to set the local time to be the same as a remote DC, which is returned by dsgetdsname. So net time should be not used to sync time domain wide.

釐清與資料提供
1. 釐清並建議不要使用NET TIME 指令來做為判定時間同步的依據,因為該指令所返回的DC是隨機產生的,並不固定。

2. Windows 時間同步的基本操作:
http://support.microsoft.com/?id=224799

Time Convergence Hierarchy
===========================
a. All client desktops select an authenticating domain controller (the domain controller returned by DSGetDCName()) as their time source. If this domain controller becomes unavailable, the client re-issues its request for a domain controller.

b. All member servers follow the same process.

c. All domain controllers in a domain make 3 queries for a DC:

- a reliable time service (preferred) in the parent domain,

- a reliable time service (required) in the current domain,

- the PDC of the current domain. It will select one of these returned DCs as a time source.

The PDC FSMO at the root of the forest is authoritative, and can be manually set to synchronize with an outside time source (such as the United States Naval Observatory).
===========================

3. 在AD Doamin中, 時間同步運作原理:
網域上的工作站以及成員伺服器會向提供認證的 DC 同步時間以及日期,而網域中的每一台 DC 會向該網域中持有 PDC Emulator 這個 FSMO 角色的伺服器進行時間同步。而網域中的 PDC Emulator 會向 Forest 中的根網域 PDC Emulator 進行時間同步。最後,根域中的 PDC Emulator 可與外界的時間伺服器(External NTP Time Server)對時。
clip_image001

4. 對於troubleshooting time server 問題, 我們可以啟用W32time debug log:
(1) Enable W32time debug logging on new DC and root DC:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;816043

(2) On new DC, ensure there is no group policy defined already. This will affect the setting of registry.

Open gpedit.msc, expand Computer Configuration --> Administative Templates --> System --> Windows Time Service, remove any settings there or under the subfolders.

(3) Restart W32time service.

net stop w32time && start w32time


參考資訊連結︰
How Windows Time Service Works
http://technet.microsoft.com/en-us/library/cc773013(WS.10).aspx