How to Set NTP Server on Windows Server?

  • Home
  • Blog
  • How to Set NTP Server on Windows Server?
Buy Windows server
DateJan 8, 2025

How to Set NTP Server on Windows Server?

Buy Windows server

Accurate time synchronization is essential for event logging, network security, and smooth system operations. The Network Time Protocol (NTP) can be configured on various versions of Windows, such as:

  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows 11
  • Windows 10

You can use the Windows Time service to synchronize time across a network through two simple methods with NTP.

Table of Contents

Steps to Set NTP Server on Windows Server

Network Time Protocol (NTP) is an internet protocol designed to synchronize computer clock times across devices within a network.

Once you’ve purchased buying Windows VPS, you can follow one of the methods outlined in this guide to enable NTP on your Windows Server. Let’s dive in!

Step 1. Open Registry Editor

Open the Start menu and look for the “Run” application in the search bar.Once it opens, type “regedit” into the text box and press Enter.

Open up Registry Editor

A window similar to the one below will appear.

Registry Editor Window

Step 2. Find NTP Server Files

Follow the below path to go to the NTP Server Configuration:

Computer>HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>W32Time>TimeProviders>NtpServer.

In the image below, you can see the end of the tree structure. The files we are looking for are visible in the right pane.

NtpServer Path

Step 3. Enable NTP Server

To open a small window, double-click the “Enabled” file. In the window that appears, find the section labeled “Value data.” As demonstrated below, change the value from 0 to 1.

After changing, click “OK”.

How to Enable NtpServer

Step 4. Create the AnnounceFlags 5

The trustworthiness of a computer as a time server in Windows is governed by a specific entry. If a computer is not designated as a time server, it cannot be recognized as reliable. For domain members, the default setting is 10.

The default value for stand-alone clients and servers is 10.

Follow the path below:

Computer>HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>W32Time>

To go to the ”Config”:

Computer>HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>W32Time>Config.

Make the AnnounceFlags 5

On the right pane, as seen above, you will find a file with the name “AnnounceFlags” while there.

Double-click it. That will cause a tiny window akin to the one in Step 3 to open.

Change the value from a to 5 under “Value data“.

Step 5. Restart NTP Server

By pressing the Windows key and typing “Services,” the “Services” window will appear.

Look for “Windows Time” once it has opened. Click “Restart” from the context menu when you right-click on it.

Restart NtpServer

Step 6. Open UDP port 123 in the Firewall

Your Windows Server must have UDP port 123 open for NTP to connect to the clocks. Please check your firewall configuration if you can’t reach the servers.

To complete this step, follow the synchronize time with host windows server 2022 guide. Remember that this port is UDP and not TCP.

Configure NTP Using PowerShell

Starting from Windows XP and Windows Server 2008 through to the latest versions of each operating system, PowerShell includes a command-line utility named w32tm.exe.

This tool allows you to configure your Windows PC to synchronize with online time servers, making it the preferred option for setting up and managing time on your Windows Server NTP (Network Time Protocol) installation.

If you prefer to use PowerShell, the second method of this guide would be your preferred one to Set NTP Server on Windows.

Open your PowerShell as administrator and use the following commands to do all the steps of the previous method.

Enable NTP Server

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer” -Name “Enabled” -Value 1

Create the AnnounceFlags 5

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Config” -Name “AnnounceFlags” -Value 5

Restart NTP Server

Restart-Service w32Time

Run the command below to allow NTP port: (If Firewall is running)

New-NetFirewallRule `

-Name “NTP Server Port” `

-DisplayName “NTP Server Port” `

-Description ‘Allow NTP Server Port’ `

-Profile Any `

-Direction Inbound `

-Action Allow `

-Protocol UDP `

-Program Any `

-LocalAddress Any `

-LocalPort 123

Most Used Commands to Configure NTP Server

Now, you know how you can set Buy Windows server. Let’s review some useful commands while setting up NTP Server on Windows.

To check NTP configuration, run:

w32tm /query /configuration

To check NTP server list, type:

w32tm /query /peers

To force NTP server synchronization, run:

w32tm /resync /nowait

Use the command below to show the source of the NTP time:

w32tm /query /source

To show the status of NTP service, type:

w32tm /query /status

At this point, you know everything you need to Set NTP Server on Windows Server. The above commands are also used for configuring Windows server 2022 NTP Server.

How to Disable NTP Server on Windows Server?

To disable Windows Internet Time Update, follow the below steps:

1. Load Control Panel.

2. Click Date and Time.

3. Click the Internet Time tab.

4. Click Change settings.

5. Click to clear the checkbox to synchronize with an Internet timeserver.

Disable NTP Server on Windows

6. Click OK to save.

7. Close the Date and Time dialog box.

8. Close the Control Panel.

Using the above steps also helps you know how to buy rdp with full admin access configure NTP server in Windows Server 2019.

How to Set NTP Server in the Windows Command line?

To configure an NTP server on Windows using the command line, you can execute the following command:

Keep in mind that Your NTP server’s hostname or IP address should be substituted for [server].

w32tm /config /syncfromflags:manual /manualpeerlist:”[server]” /reliable:YES /update

When you are finished, use the following commands to restart the Windows Time service:

net stop w32time

net start w32time

How do I configure NTP Server in Windows Server 2016?

Follow the below steps to configure Windows Server 2016 as an NTP server:

Sync Server Time by running:

w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL

pool.ntp.org is an example of an external NTP server

Restart the time service to apply the recent changes:

Stop-Service w32time

Start-Service w32time

To enable NTP server feature, set the Enabled flag to 1 open and regedit, and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer

Prevent syncing with the hostname by Buy Admin RDP disabling Time Sync for VMs (If Windows runs as a VM)

Sync Windows client machines time to sync their time by running:

w32tm /resync

The time synchronization across your network must be accurate now.

How do I find my NTP Server on Windows?

To find out the latest/current NTP configuration of your system, run:

w32tm /query /configuration

The configuration settings that you have set up will be displayed using this command.

Also, if you need to check the stratum, last sync, NTP server, and the NTP server/servers that the system is getting time from, type:

w32tm /query /status

And finally, consider that the following command shows the current system time:

time /T

How do I know if NTP is running on a Windows server?

To do this, you can check whether the NTP Server is reporting the correct time and date. So, run:

: w32tm /stripchart /computer:IPADDRESSORDNSNAME /dataonly /samples:5

Where the IP Address or DNS name of the NTP time-server you want to check is equal to IPADDRESSORDNSNAME.

The below commands enable you to check if NTP is running on your Windows server:

w32tm /query /source

w32tm /query /peers

How to set NTP Server in Active Directory?

To ensure accurate time synchronization between domain controllers and domain computers, you can configure a Windows NTP server by following the steps outlined below:

  • Modify the Server value to NTP
  • Set the AnnounceFlags value to 5
  • Enable NTPServer
  • Configure Time Correction Settings on all the domain controllers
  • Confirm Correct Time Settings for PDCs

How to set NTP in Windows 10?

Following the below path, you can set NTP Server Windows 10:

Control Panel > Clock, Language, and Region > Date and Time > Internet Time tab > Change settings… > Enable NTP > Specify a unique timeserver (Optional).

To modify the NTP server on Windows, follow these steps: First, make the necessary changes to the NTP server settings. Once done, restart your Windows 10 system to ensure that the changes are applied and the NTP configuration is updated on your computer.

How do I sync time in CMD?

You can force Windows to show the correct time. To do this, search for ”Command Prompt”, right-click on it, and select ”Run as administrator ”. Then, type:

w32tm /resync

In this way, the install ntp server windows server 2022 will be forced to synchronize its time with a trustworthy Windows time server, guaranteeing that the accurate time is shown.

How do I manually sync time with NTP server?

To sync your system time with an NTP manually, follow the below steps:

  • Open an elevated Command Prompt.
  • Run the command below while you replace ntp_server with the address of your preferred NTP server:

w32tm /config /manualpeerlist:”ntp_server” /syncfromflags:manual /reliable:yes /update

  • When you are finished, run the below commands to restart the time service:

net stop w32time

net start w32time

  • To resync the time with the NTP server, type:

w32tm /resync

  • Check the status of synchronization:

w32tm /query /status

How to start NTP Service in Windows Server 2012?

Follow the below steps to set up NTP Service in Windows 2012:

  • Search for Command Prompt, run it as an administrator, and type:

net start w32time

  • By pressing Enter, the time service will be initiated. In this way, your Windows 2012 server will synchronize time with external NTP servers or other time sources.

Does Windows use NTP?

Yes. Accurate event logging, security, and other system operations all depend on this synchronization.

‘Windows operating systems ensure time synchronization through the use of the Network Time Protocol (NTP). This method guarantees both system clock precision and network synchronization.

Windows systems automatically synchronize Buy Windows server their time with external domain controllers or NTP servers by default.

How do I Check my NTP Server Connection?

Follow the below path or use commands to learn how to check NTP server in Windows and check your NTP configuration:

Control Panel > Date and Time > Set the time and date > Internet Time > Change settings…

If you prefer to work on CML, run the commands below:

  • Check your current NTP configuration:

w32tm /query /configuration

  • Check NTP Status:

w32tm /query /status

Check your current System Time:

time /T

Make sure you have elevated privileges when executing these commands.

How do I restart NTP service in Windows?

Follow the below steps to restart the NTP service:

Open a Command Prompt and run it as administrator. To Stop the time service, use the command below and press Enter:

net stop w32time

To start the time service, run the following command and press Enter:

net start w32time

In this way, the NTP service will be restarted on your Windows computer while accurate time synchronization is guaranteed.

What is the default NTP Server for Windows?

The Buy Admin RDP NTP server is used by Windows for time synchronization. It can be different according to Domain-Joined Computers and Standalone Computers.

However, you can change the NTP server by following the below path:

Control Panel > Date and Time > Internet Time > Change Settings > Select an STP server > Update Now.

FAQ

How Does NTP Server Work on Windows? 

A time-request exchange is started by the NTP client and the NTP server. The client can then determine the link latency, its local offset, and set its local clock to sync with the server computer’s clock.

Once the NTP service is configured on your server, Windows clients within the domain will automatically synchronize their time with syncronize time with host windows server 2022 the domain controllers and other domain controllers in the network.

It’s important to ensure that, for virtual machines, the NTP settings are configured buy rdp with full admin access to sync solely with the time service, rather than the host system’s time.

Leave a Reply