Windows Time

Force Time Sync on Windows Server or Client

There have been numerous incidences in my career when I have literally pulled all my hair out with server services only to realise that the time has been out of sync on the server. This might have been misconfigured domain controllers, to virtual machines pulling the wrong times from their hosts.

Therefore I decided to quick provide a means to quickly sync your time on Windows Server or client to the current region as configured in control panel.

  1. To update, use the command below (2008, 2012, 2016 server compatible)
w32tm /config /manualpeerlist:"ntp_server" /syncfromflags:manual /reliable:yes /update

change the ntp_server with your source

  1. Restart the time service:
net stop w32time 
net start w32time
  1. Resync the time
w32tm /resync
  1. Verify your sync status
w32tm /query /status

Commands above should be fine if your sources are working correctly and/or your connection is OK (firewall or Microsoft Forefront can be an issue also). The commands below can help with troubleshooting

To list out peers

w32tm /query /peers

To list out NTP Sources:

w32tm /query /source

Leave a comment below if you have any queries.

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com