0

On my Windows 10, I need to synchronize my clock at every startup, to do that I go into Settings → Time & Language → Synchronize your clock → Sync now
I am wondering if there is a powershell command to do the same (without elevated privilege)
I found some solutions with w32tm but as the service is not started and need elevated privilege I would prefer sticking to the same mechanism I use manually.

15
  • How are you syncing your clock, even by clicking "Sync now", if the service responsible for performing the syncing is started.
    – Ramhound
    Commented Mar 20, 2020 at 13:14
  • I suppose the click on the "Sync now" button starts the w32tm service, because it is started after that and it was not before. What surprised me is I was never asked for elevated privilege.
    – Nicolas
    Commented Mar 20, 2020 at 13:19
  • Pressing that button does not start the service. Are you 100% positive your time is actually being synched? Why exactly is this service, which normally is automatically started when the machine boots, not set to the default configuration? To answer your question, any commands that might exists, as you expect require the time service to be running. They would just be an interface to w32tm, which will require elevated permissions, which you are unable or not willing to provide to the script.
    – Ramhound
    Commented Mar 20, 2020 at 13:23
  • @Ramhound At startup my clock is always 1 hour late. The w32tm command doesn't work saying the service is not started. Clicking on the "Sync now" button put my clock at the right hour.
    – Nicolas
    Commented Mar 20, 2020 at 14:05
  • Is your clock one hour later on purpose? If you have not purposefully configured your device to be an hour off? That is an extremely easy problem to solve. You still have not explained the reason the service is not automatically starting though.
    – Ramhound
    Commented Mar 20, 2020 at 14:07

0

Browse other questions tagged .