How do I force sync the time on Windows Workstation or Server?

What is the command to sync a Windows workstation or server to its configured time source?


As Kyle said w32tm /resync is the modern way to do this. See this Link to Microsoft Knowledgebase (KB 307897) for more information on the w32tm command.

There is also net time which is an older version but perhaps easier.


For those that still asking this question.

  1. To update, use the command below (2008 and 2012 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
    
  2. Resync the time

    w32tm /resync
    
  3. 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

You can use the following command:

w32tm /resync