Windows Time Fix by rafarrw GitHub

Fix Windows time synchronization.

A PowerShell utility that repairs the Windows Time service, checks real NTP servers, and keeps the clock synchronized after network changes.

Run in PowerShell

irm https://rafarrw.github.io/Windows-Time-Fix/run.ps1 | iex

Open PowerShell normally. The script requests administrator approval only when a repair needs it.

How to use it

Start with the recommended repair. The menu stays in the same PowerShell window and explains what is happening as it runs.

  1. Run the command

    Paste the command above into a normal PowerShell window.

  2. Choose Recommended

    Option 1 creates a backup and handles the common Windows Time failures.

  3. Follow the progress

    The script checks connectivity, repairs the configuration, synchronizes the clock, and verifies the result.

  4. Use Advanced if needed

    Advanced recovery is reserved for a severely incorrect clock or a corrupted service.

What it repairs

The fix targets the service and configuration problems that normal resync commands do not address.

Windows Time service
Uses Automatic Delayed Start and removes workgroup-incompatible start triggers.
Reliable time sources
Tests four NTP servers before changing anything and keeps reachable peers available.
Retry and poll settings
Replaces long retry delays and week-long polling with settings suited to a standalone computer.
Automatic recovery
Adds checks for startup, periodic maintenance, and network reconnection.

Built-in safeguards

The script checks the machine first and keeps a recovery path for every repair.

  • Backs up the W32Time registry configuration
  • Blocks domain-joined computers by default
  • Tests outbound NTP access before changes
  • Restores large-correction limits after resync
  • Keeps a detailed log in ProgramData
  • Includes a diagnosis-only option

Before you run it

This project is intended for standalone or workgroup Windows computers. Domain-joined computers should normally follow their domain time hierarchy.

Start with option 1. Open Advanced options only if the normal repair does not solve the issue.