NTP : Configure NTP Client2021/12/01 |
Configure NTP Client to synchronize time with NTP Server.
NTP Client setting is configured with NTP Server [time.windows.com] by Windows default,
so If Internet connected environment computer, time and date is already synchronizing.
Furthermore, if computers are in Active Directory Domain, NTP Client setting is also configured like follows, so generally it does not need to change settings.
* Domain Controlers synchronizes time with PDC in the Domain
* PDC in a Domain synchronizes time with PDC that is in Parent Domain or synchronizes time with other Domain Controlers * Client Computers synchronizes time with Domain Controler that Clients now logons
In WorkGroup Environment Computers, it's possbile to change default NTP Server to others like follows.
|
|
[1] | Run PowerShell with Admin Privilege and Configure. |
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # confirm current synchronization NTP Server PS C:\Users\Administrator> w32tm /query /source time.windows.com,0x8 # change target NTP Server (replace to your timezone server) # number means # 0x01 : SpecialInterval # 0x02 : UseAsFallbackOnly # 0x04 : SymmetricActive # 0x08 : NTP request in Client mode PS C:\Users\Administrator> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\Parameters" -Name "NtpServer" -Value "ntp.nict.jp,0x8" # restart Windows Time service PS C:\Users\Administrator> Restart-Service w32Time # re-sync manually PS C:\Users\Administrator> w32tm /resync Sending resync command to local computer The command completed successfully. # verify status PS C:\Users\Administrator> w32tm /query /status Leap Indicator: 0(no warning) Stratum: 2 (secondary reference - syncd by (S)NTP) Precision: -23 (119.209ns per tick) Root Delay: 0.0154647s Root Dispersion: 7.7603588s ReferenceId: 0x85F3EEF3 (source IP: 133.243.238.243) Last Successful Sync Time: 11/29/2021 11:05:40 PM Source: ntp.nict.jp,0x8 Poll Interval: 6 (64s) |
[2] | If a Computer is in Active Directory Domain Environment and he is a Forrest Root, synchronization target is often configured to [Local CMOS Clock] (Hardware Clock), then, if you'd like to change settings from [Local CMOS Clock] to other network NTP server, set like follows. |
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # in AD Domain Environment, [Type] is generally set to [NT5DS] PS C:\Users\Administrator> (Get-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\Parameters").GetValue("Type") NT5DS # on a Domain Controller of Forrest Root, # if target is [Local CMOS Clock], change [Type] to [NTP] # next, change to NTP server with the same way in [1] section PS C:\Users\Administrator> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\Parameters" -Name "Type" -Value "NTP" |
Sponsored Link |