To get the time information of the Windows Server from the linux server, I was changing the settings of the Register and restarting the service. The blog I mentioned in the source offered a very practical method using powershell:
Time Servers (Local): ntp01.osinetworks.net and ntp02.osinetworks.net
If you want to use global servers, you can choose the following servers for Turkey:
0.tr.pool.ntp.org
1.tr.pool.ntp.org
2.tr.pool.ntp.org
3.tr.pool.ntp.org
1) Open Powershell with administrator rights.
2) Stop the time service.
netstop w32time
3) Change registry settings.
w32tm /config /syncfromflags:manual /manualpeerlist:”ntp01.osinetworks.net, ntp03.osinetworks.net”
4) Indicate that the servers are reliable.
w32tm /config /reliable:yes
5) Restart the service
netstart w32time
Useful Commands
Some other commands that can be useful for this process are given below:
- w32tm /query /configuration (checks and shows the NTP configuration)
- w32tm /query /peers (checks and shows the list of NTP servers configured along with their status)
- w32tm /resync /nowait (forces the synchronization of time)
- w32tm /query /source (shows the source of the time)
- w32tm /query /status (shows the service status, use it to check whether the time is coming from the external NTP servers or the cmos clock)
Resources:
https://appuals.com/how-to-configure-windowa-server-to-query-an-external-ntp-server/
