Server time synchronization is a problem that is easily overlooked. However, in enterprise application environments, the time difference between different servers may cause application system problems. W32tm provided by WindowsProgramIt can be used to set the time synchronization server. Its usage is as follows:
1. Specify and synchronize external time sources
W32tm/config/manualpeerlist: "210.72.145.44"/syncfromflags: manual/reliable: yes/update
/Manualpeerlist indicates the list of external time source servers. multiple servers can be separated by spaces. 210.72.145.44 is the IP address of the time server of China National Time Service Center.
/Syncfromflags: Manual indicates synchronization with the server in the specified external time source server list
/Reliable: Yes sets this computer as a reliable time source. This setting only makes sense to the domain controller.
/Update sends a configuration change notification to the Time Service for the change to take effect.
2. display the time difference between the local time and the target time
W32tm/stripchart/computer: 210.72.145.44/samples: 30/dataonly
3. display the specified external time source of the current server
W32tm/query/source
4. Restore the default value of Windows Time Service
Net stop w32time
W32tm/unregister
W32tm/register
Net start w32time
In the domain environment, you only need to set the external time source of the root domain controller. When other servers are added to the domain, the system will automatically set time synchronization with the domain controller.
Changing the settings can solve the time synchronization problem of the domain controller, such as: Time-service eventid: 36