How to make your Windows Server a NTP Server -

How to make your Windows Server a NTP Server

views 0 Comments

On your windows server, open an elevated PowerShell:

Set-ItemProperty `
  -Path "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" `
  -Name Enabled `
  -Value 1

Set-ItemProperty `
  -Path "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Config" `
  -Name AnnounceFlags `
  -Value 5

Restart-Service W32Time

Allow inbound NTP through Windows Firewall:

New-NetFirewallRule `
  -DisplayName "NTP Server UDP 123" `
  -Direction Inbound `
  -Protocol UDP `
  -LocalPort 123 `
  -Action Allow

Then check:

w32tm /query /status
w32tm /query /configuration
Get-NetUDPEndpoint -LocalPort 123

We want UDP/123 listening.