8

I would like to be able to synchronize my windows 10 computer clock when it goes out of sync... From the commandline with 1 command.

This solution shows how to do it via settings. https://superuser.com/a/1050717/44355

Is there a way to perform this via some windows 10 api on the commandline?

csch0
  • 148

2 Answers2

17

Start a PowerShell or CMD with elevated rights and use the W32tm command:

W32tm /resync /force

For further reading: interesting article about the difference between NET TIME and W32tm.

JorgeM
  • 433
agtoever
  • 6,402
3

net time /set also works and doesn't require admin rights.

Vadzim
  • 1,342