CMD Simulator
Advanced System Toolsw32tm

W32TM Command Guide | Windows Time Service (NTP) Diagnostics (2026)

Master the w32tm command to configure and troubleshoot NTP synchronization in Windows. Includes syntax, 10+ examples, and advanced time-sync tips for Active Directory.

Rojan Acharya·
Share

The w32tm command (Windows Time Manager) is a sophisticated command-line utility used to diagnose, configure, and troubleshoot the Windows Time service (W32Time). In any networked environment, especially those running Active Directory, precise time synchronization is not just a convenience—it's a security and operational requirement. Kerberos authentication, log auditing, and database replication all rely on a consistent time source across the entire infrastructure.

While the "Date and Time" settings in the Windows Control Panel provide a simple interface for desktop users, w32tm offers the deep-level access needed by network administrators and system engineers to manage NTP (Network Time Protocol) settings, query synchronization status, and force updates across distributed systems. It replaces the older net time command, providing significantly more detail and control over the underlying sync mechanisms.

This comprehensive 2026 guide will walk you through the essential subcommands of w32tm, including how to configure external time sources, monitor synchronization health, and resolve the dreaded "The computer did not resync" errors. Whether you are managing a standalone workstation or a complex multi-site domain, this guide is your definitive resource for Windows time management.

What is the Windows Time Service (W32Time)?

The Windows Time service is a Microsoft implementation of the Network Time Protocol (NTP). Its primary goal is to ensure that all computers in a network share the same time. In an Active Directory environment, this follows a hierarchical structure:

  1. Workstations and Member Servers: Sync time from their Authenticators (Domain Controllers).
  2. Domain Controllers: Sync time from the PDC Emulator (Primary Domain Controller) in their own domain.
  3. PDC Emulator: Syncs time from the PDC in the root domain or an external authoritative NTP server (like pool.ntp.org).

Failure to maintain synchronization (typically more than a 5-minute offset) will result in Kerberos authentication failures, preventing users from logging into the domain.

Syntax

The w32tm command uses a modular syntax with specific switches for different types of operations.

w32tm [/config | /monitor | /ntp | /query | /register | /resync | /stripchart | /unregister]

Key Subcommands

  • /query: Displays the current configuration and status of the time service.
  • /config: Used to change NTP server lists, peer intervals, and synchronization flags.
  • /resync: Forces the computer to re-synchronize its clock with its current peer.
  • /monitor: Analyzes a list of network time servers for accuracy and reachability.
  • /stripchart: Displays a real-time graph of the time offset between the local machine and a target server.
  • /register: (Used only in maintenance) Registers the service to run as a background task.
  • /unregister: (Used only in maintenance) Removes the service from the registry.

Detailed Parameters and Settings

Configuration Flags (for /config)

FlagDescription
/manualpeerlistA space-separated list of NTP server addresses (e.g., "time.google.com,0x1").
/syncfromflags:MANUALTells the service to use the manual peer list instead of domain hierarchy.
/syncfromflags:DOMHIERTells the service to follow the Active Directory domain hierarchy.
/updateNotifies the time service that the configuration matches what is in the registry.

Query Status Identifiers (for /query /status)

IdentifierDescription
StratumThe "distance" from a reference clock. Stratum 0 is a GPS/Atomic clock; Stratum 1 is a server directly connected to it.
PrecisionHow accurately the clock can maintain time.
Root DispersionThe maximum error relative to the root server.

10 Practical W32tm Command Examples

1. Checking the Current Sync Status

Before making any changes, you should check where your computer is currently getting its time from.

w32tm /query /status

Expect Output: Source: time.windows.com,0x9 Explanation: Displays essential info like the time source, stratum level, and the last time a successful sync occurred.

2. Viewing the Current Time Configuration

To see all the registry-based settings for the time service:

w32tm /query /configuration

Explanation: This shows the full technical configuration, including poll intervals and phase correction settings.

3. Forcing an Immediate Time Sync

If you notice the clock is off, you can force a resync immediately.

w32tm /resync /rediscover

Explanation: The /resync command pushes the clock to update. The /rediscover flag forces it to look for its peer again.

4. Configuring a Peer for External NTP (Standalone)

For a machine not on a domain, or the PDC Emulator in a forest:

w32tm /config /manualpeerlist:"pool.ntp.org,0x1 time.google.com,0x1" /syncfromflags:manual /reliable:YES /update

Warning: Ensure you include the ,0x1 flags (Symmetric Active) and the /update command to apply the changes.

5. Reverting to Domain Hierarchy

If a machine was manually configured and you want it to follow the AD domain controller again:

w32tm /config /syncfromflags:domhier /update

Explanation: This is a vital command for fixing "out of sync" workstations in a corporate environment.

6. Checking Time Offset against a Server (Stripchart)

To see how much your clock drifts compared to a specific server in real-time:

w32tm /stripchart /computer:time.nist.gov /samples:5 /dataonly

Explanation: Displays a list showing the exactly millisecond offset for each sample.

7. Monitoring Network Time Servers

To see the health and accuracy of all time servers in your target list:

w32tm /monitor /computers:pool.ntp.org

Expect Output: ICMP: 0ms delay, NTP: 154.3ms error Explanation: Helps identify which NTP servers are lagging or providing inaccurate data.

8. Finding the Source of Time (Source Hierarchy)

Useful for tracing back to the master clock in a domain:

w32tm /query /source

Explanation: Simply returns the name or IP of the peer this computer is currently using.

9. Peering into the Time Zones

To see the current time zone information configured on the system:

w32tm /tz

Explanation: Displays the active time zone, its bias (offset), and when Daylight Savings Time begins/ends.

10. Re-registering the Time Service (Repair)

If the service is corrupted or missing from the service list:

net stop w32time
w32tm /unregister
w32tm /register
net start w32time

Explanation: This completely resets the Windows Time service configuration in the registry to factory defaults.

Common Use Cases for W32tm

1. PDC Emulator Setup

Every Active Directory forest has one "master" clock (the PDC Emulator in the forest root). Administrators use w32tm to point this master clock to a highly reliable external source like a GPS clock or NIST.

2. Fixing "Inconsistent Time" Authentication Errors

When users cannot log in (Error: "The system cannot log you on because your computer's clock is not in sync"), IT staff use w32tm /config /syncfromflags:domhier /update followed by w32tm /resync to fix the machine's relationship with the DC.

3. Server Auditing Compliance

Many industries (like Finance/HIPAA) require server logs to have a precision time within 1 second. w32tm monitoring and stripcharts are used to prove compliance with these standards.

4. Database Replication Consistency

Distributed databases (SQL Always On) require tightly synced clocks to resolve conflicts. w32tm ensures those servers are perfectly aligned.

Tips and Best Practices

  • The ",0x1" Flag: When setting a manual peer list, always append ,0x1 to the address. This tells Windows to treat it as an NTP source rather than a peer.
  • Port 123 (UDP): Ensure your firewall allows outbound and inbound traffic on UDP Port 123, which is the default for NTP.
  • Check the PDC First: If multiple machines are out of sync, check the PDC Emulator. If the master clock is wrong, everyone else will be too.
  • Run as Administrator: Almost all w32tm commands that modify configuration require elevated privileges.
  • Don't use "net time": While net time still exists for legacy compatibility, it uses a different protocol (SMB) which is less accurate than NTP.
  • Be Patient: If you force a sync with /resync, it may take a few seconds for /query /status to reflect the new source.
  • Monitor the Event Log: Check System Log -> Source: Time-Service for event IDs like 12 (new source) or 14 (sync error).
  • Virtualization Caution: If a server is a VM, ensure "Time Synchronization" in Hyper-V or VMware tools is managed correctly. Generally, the PDC Emulator should NOT sync time from the host hardware but from an external NTP source.
  • Use pool.ntp.org: This is a global, community-run project that provides reliable time servers worldwide.
  • Verify with Stripcharts: Before trusting a new time source, run a stripchart for a few minutes to ensure it is stable and has low latency.

Troubleshooting Common Issues

Issue 1: "The computer did not resync because no time data was available."

Cause: The NTP port (123) is blocked, the NTP server address is wrong, or the server is down. Solution: Check connectivity with w32tm /stripchart /computer:<address>. If it fails, check your firewall.

Issue 2: "The service has not been started."

Cause: The W32Time service is set to Manual or Disabled. Solution: Run sc config w32time start=auto followed by net start w32time.

Issue 3: "Access is denied."

Cause: Running the command from a standard Command Prompt. Solution: Open an "Elevated" command prompt (Run as administrator).

Issue 4: "The time difference between the local machine and the server is too large."

Cause: Windows has a default safety limit (MaxPosPhaseCorrection and MaxNegPhaseCorrection). Solution: Manually set the clock as close as possible (within 1 minute) using the time command, then run w32tm /resync.

Related Commands

NET TIME – Legacy Time Tool

Used in older versions of Windows and for simple time display. Obsolescent in favor of w32tm.

TIME – Manual Clock Set

The internal CMD command for manually typing in the current time.

###Powershell – Advanced Sync PowerShell can also be used to manage time, often by calling the underlying WMI or Registry classes directly.

Frequently Asked Questions

Why is my Windows time always wrong?

This is usually caused by a failing CMOS battery on the motherboard, a misconfigured NTP source, or a time zone mismatch.

What is the default NTP server for Windows?

By default, Windows is configured to use time.windows.com.

Can I sync time with a Linux server?

Yes, w32tm is fully compatible with any standard NTP server, including those running on Linux (NTPd).

How do I see what time servers are in use?

Use w32tm /query /peers to see a detailed list of all configured time sources and their current status.

What does "Stratum" mean in w32tm?

Stratum levels indicate the distance from a reference clock. Stratum 1 is a server directly connected to an atomic clock. Stratum 2 is a server that syncs from Stratum 1, and so on.

Is NTP port UDP or TCP?

NTP uses UDP Port 123. It is not a TCP protocol.

Does Active Directory require w32tm?

Yes, Active Directory relies heavily on Kerberos, which requires time synchronization to prevent "Replay Attacks."

How do I reset all time settings?

Run net stop w32time, w32tm /unregister, w32tm /register, and net start w32time to restore defaults.

Quick Reference Card

ActionCommand
Check Sync Statusw32tm /query /status
Force Resyncw32tm /resync /rediscover
View Configw32tm /query /configuration
Set External NTPw32tm /config /manualpeerlist:"pool.ntp.org,0x1" /syncfromflags:manual /update
Set Domain Syncw32tm /config /syncfromflags:domhier /update
Plot Time Graphw32tm /stripchart /computer:<address>

Summary

The w32tm command is the definitive tool for managing time in a Windows environment. From simple desktop syncs to complex Active Directory hierarchies, it provides the diagnostic power and configuration flexibility required by modern IT professionals.

By understanding the hierarchy of time in a domain and mastering the /config and /query switches, you can ensure that your network remains secure, your logs remain synchronized, and your users remain authenticated. Don't let clock skew disrupt your infrastructure—keep your systems perfectly aligned with w32tm.