Skip to content

Configure NTP Server

functions/public/Invoke-WPFFixesNTPPool.ps1
 1function Invoke-WPFFixesNTPPool {
 2    <#
 3    .SYNOPSIS
 4        Configures Windows to use pool.ntp.org for NTP synchronization
 5
 6    .DESCRIPTION
 7        Replaces the default Windows NTP server (time.windows.com) with
 8        pool.ntp.org for improved time synchronization accuracy and reliability.
 9    #>
10
11    Start-Service w32time
12    w32tm /config /update /manualpeerlist:"pool.ntp.org,0x8" /syncfromflags:MANUAL
13
14    Restart-Service w32time
15    w32tm /resync
16
17    Write-Host "================================="
18    Write-Host "-- NTP Configuration Complete ---"
19    Write-Host "================================="
20}