How to sync time with NTP server in windows

To sync your time with a known local timeserver/domain controller, open up CMD (preferably with administrative privileges) and type

net time timeserver /set /yes


If you instead want to sync with an external time server.

w32tm /config /syncfromflags:manual / /reliable:no /update


Another useful command to note is:

w32tm /stripchart / /samples:5 /dataonly

this will check the difference between current time and external ntp server.