To force time sync during boot and every hour in Windows 11, you can create a PowerShell script with the following commands:
#Set the time server to sync with Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" -Name "1" -Value "time.windows.com" #Enable automatic time synchronization every hour Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient" -Name "SpecialPollInterval" -Value "3600" #Start the Windows Time service Start-Service w32time
Save the script with a .ps1 extension, and then set it to run on startup by following these steps:
- Press the Windows key + R on your keyboard to open the Run dialog box.
- Type "shell:startup" (without the quotes) and press Enter. This will open the Startup folder.
- Create a shortcut to your PowerShell script in the Startup folder.
- Restart your computer to test the script.
The script will force a time sync during boot and every hour thereafter.