
Network Time Protocol (NTP) is a highly scalable internet protocol that determines the best time information and synchronizes accurate settings on a computer system. This guide explains how to set the time zone and configure NTP on a Windows Server.
This guide uses Windows Server 2019, but these instructions work on any machine with Server 2016 or later.
Before you begin:
From the start menu, open Windows PowerShell, or open the run dialog (Win key + R), type powershell in the search bar, and click OK to start PowerShell.
Run the following command to check the server timezone.
View all available timezones.
To find your target timezone, use the following command to filter by name.
The command above displays all names containing the characters
US. You can use a different string such as London.
Change your timezone.
You can also change the timezone by ID.
In addition to setting the timezone, you can also configure Windows to use NTP to synchronize the time.
Open the Run dialog window by pressing the Windows key (WIN) + R on your keyboard.
In the search bar, enter regedit and click OK to open Registry Editor.
Expand the registry navigation tree:
HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services
Expand W32Time.
Click Config.
Select AnnounceFlags
Enter 5 in the Value data field.
Click OK to save changes.
In the left pane, click Parameters.
By default, Vultr uses the time.constant.com time server, located on our high-speed infrastructure. If you want to use a different time server, you can change the value of the NtpServer parameter by following these steps.
Double-click NtpServer
Change the value data field to your preferred value. For example, to sync with the United States NTP pool, use:
You can find a list of NTP Pool servers at the official website.
Expand TimeProviders.
Click NtpServer.
Double click Enabled, change the value data from 0 to 1, and click OK to save changes.
Close the registry editor, open the start menu, and search the keyword services.
In the services window, scroll through the list, select Windows Time, right-click, and select Restart to apply NTP changes.
If you prefer to use Powershell, you can use the following commands to configure NTP.
Open PowerShell with administrative privileges.
Check the NTP time synchronization status.
Enter the following command to set the time AnnounceFlags to 5.
(Optional) If you want to use NTP pool servers instead of Vultr's NTP server, run the following command.
Enable NTP Server.
Restart the Windows Time service.
Test NTP synchronization.
You have successfully set the timezone and configured NTP on Windows Server 2019. If you plan to have other machines on a Vultr VPC use your NTP server, allow port 123 in the Windows Server Firewall. For further information, refer to the following guides.
0 Comments
Be the first to comment and share your perspective with the community.