how to configure ntp server in windows server 2016
Installing the NTP Server Feature
Open Server Manager: Launch Server Manager from the taskbar.
Add Roles and Features: Click on "Add roles and features" from the Dashboard or the Manage menu.
Configuring the NTP Server
Installing the NTP Server Feature:
Click "Next" until you reach the "Features" page.
Select "Time Server" under "Network Time Protocol (NTP) Server".
Click "Next" and then "Install" to install the NTP feature.
Configuring the NTP Server:
Open a PowerShell window with administrative privileges.
Use the following command to enable and start the NTP server service:
text
Enable-WindowsFeature w32time
Start-Service w32time
Configuring Firewall Settings
Open Windows Firewall with Advanced Security: Search for it in the Start menu.
Create an Inbound Rule:
Click on "Inbound Rules" in the left pane.
Click on "New Rule..." in the right pane.
Select "Port" and click "Next".
Select "UDP" and enter "123" as the specific local port. Click "Next".
Select "Allow the connection" and click "Next" through the remaining steps.
Name the rule (e.g., "NTP Inbound Rule") and click "Finish".
Create an Outbound Rule:
Follow the same steps as above, but this time select "Outbound Rules".
Configuring NTP Server Settings
Open Registry Editor: Press Windows key + R, type "regedit", and press Enter.
Navigate to the NTP Server Parameters: Go to
text
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Parameters
.
Edit Registry Values:
Right-click on the right pane, select "New" > "DWORD Value", and create a new value named "NtpServer".
Double-click on "NtpServer" and set its value to "0x9".
Configure NTP Server Peers (Optional):
Add peers by modifying the "NtpServer" value with a comma-separated list of server addresses.
Restart the Windows Time Service:
In the PowerShell window, use the following command:
text
Restart-Service w32time
Verify NTP Server Configuration
Check the NTP Service Status:
In the PowerShell window, use the command:
text
Get-Service w32time
Verify NTP Synchronization:
Use the command w32tm /query /status to verify the synchronization status.
Conclusion
By following these steps, you should be able to configure the NTP server on Windows Server 2016. Don't forget to regularly monitor the server's time synchronization to ensure accurate timekeeping for your network.
visit : https://docs.vultr.com/how-to-set-the-timezone-and-configure-ntp-on-windows-server