How to sync windows 10 clock to internet from commandline?

Solution 1:

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.

Solution 2:

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