How to configure NTP Server and NTP Client in Windows Server 2019
Configure NTP Server in Windows Server 2019
If the computer is an Active Directory Domain Controller, the NTP Server feature is enabled automatically. So, the following example is for a computer that needs to enable NTP Server in a WorkGroup environment.
Step 1. Run PowerShell with admin rights and configure the following:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # confirm current setting (follows are default settings) PS C:UsersAdministrator> Get-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeTimeProvidersNtpServer" InputProvider : 0 AllowNonstandardModeCombinations : 1 EventLogFlags : 0 ChainEntryTimeout : 16 ChainMaxEntries : 128 ChainMaxHostEntries : 4 ChainDisable : 0 ChainLoggingRate : 30 RequireSecureTimeSyncRequests : 0 DllName : C:WindowsSYSTEM32w32time.DLL Enabled : 0 PSPath : Microsoft.PowerShell.CoreRegistry::HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServ icesw32timeTimeProvidersNtpServer PSParentPath : Microsoft.PowerShell.CoreRegistry::HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServ icesw32timeTimeProviders PSChildName : NtpServer PSDrive : HKLM PSProvider : Microsoft.PowerShell.CoreRegistry # enable NTP Server feature PS C:UsersAdministrator> Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeTimeProvidersNtpServer" -Name "Enabled" -Value 1 # set [AnnounceFlags] to 5 # number means # 0x00 : Not a time server # 0x01 : Always time server # 0x02 : Automatic time server # 0x04 : Always reliable time server # 0x08 : Automatic reliable time server PS C:UsersAdministrator> Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetservicesW32TimeConfig" -Name "AnnounceFlags" -Value 5 # restart Windows Time service PS C:UsersAdministrator> Restart-Service w32Time # if Windows Firewall is running, allow NTP port PS C:UsersAdministrator> New-NetFirewallRule ` -Name "NTP Server Port" ` -DisplayName "NTP Server Port" ` -Description 'Allow NTP Server Port' ` -Profile Any ` -Direction Inbound ` -Action Allow ` -Protocol UDP ` -Program Any ` -LocalAddress Any ` -LocalPort 123
Step 2. NTP Server Host also needs time synchronization with other Hosts as the NTP Client.
Configure NTP Client in Windows Server 2019
NTP Client settings are configured with NTP Server [time.windows.com] by default Windows, so if the computer is connected to the Internet, the date and time will be synchronized.
Furthermore, if the computer is in Active Directory Domain, the NTP Client settings are also configured as follows, so generally there is no need to change the settings:
- Domain Controller synchronizes time with PDC in the domain.
- The PDCs in a domain time synchronize with the PDCs in the Parent Domain (primary domain) or with other Domain Controllers.
- The client computers synchronize the time with the Domain Controller on which the client is currently logged on.
In the WorkGroup environment, you can change the default NTP server to other servers as follows.
Step 1. Run PowerShell with admin rights and configure the following:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # confirm current synchronization NTP Server PS C:UsersAdministrator> 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:UsersAdministrator> Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeParameters" -Name "NtpServer" -Value "ntp.nict.jp,0x8" # restart Windows Time service PS C:UsersAdministrator> Restart-Service w32Time # re-sync manually PS C:UsersAdministrator> w32tm /resync Sending resync command to local computer The command completed successfully. # verify status PS C:UsersAdministrator> w32tm /query /status Leap Indicator: 0(no warning) Stratum: 4 (secondary reference - syncd by (S)NTP) Precision: -23 (119.209ns per tick) Root Delay: 0.0252246s Root Dispersion: 0.0824040s ReferenceId: 0x85F3EEF3 (source IP: 133.243.238.243) Last Successful Sync Time: 9/23/2019 10:15:33 PM Source: ntp.nict.jp,0x8 Poll Interval: 8 (256s)
Step 2. If a computer is in an Active Directory domain environment and is a Forest Root, the synchronization target is usually configured to [Local CMOS Clock] (Hardware Clock). Then, if you want to change the setting from [Local CMOS Clock] to NTP server network, please set as follows:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # in AD Domain Environment, [Type] is set to [NT5DS] PS C:UsersAdministrator> (Get-Item -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeParameters").GetValue("Type") NT5DS # if target is [Local CMOS Clock] but you'd like to change it, change [Type] to [NTP] first # next, change to NTP server with the same way in [1] section PS C:UsersAdministrator> Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeParameters" -Name "Type" -Value "NTP"
You should read it
- How to Install, Configure, and Test Windows Server 2012 R2 Single Subnet DHCP Server
- Install Windows Server 2003 and create a backup server
- KMS activation deployment for Windows 10, Windows 8.1, Windows Server 2012 R2, Windows Server 2016
- Deploy KMS activation on Windows Server 2008
- HOW TO INSTALL ISA SERVER ENTERPRISE 2000 - Part III
- Balance downloading Web-Proxy Client with ISA Server 2004 Standard Edition (Part 2)
- Install the client (Client) for ISA
- How to Enable Cross Origin Resource Sharing (CORS) for Sharing Resource Using Apache Servers, PHP and Jquery
May be interested
- Instructions for configuring IPv6 on Windows Serverassigning addresses on an ipv6 network is a bit different from ipv4. ipv6 can be assigned to an interface in four ways in how to configure this ipv6.
- What is the Client Server Runtime Process or csrss.exe and why does it run on the computer?if you are using a windows computer and open task manager, you will probably see one or more client server runtime process (csrss.exe) running on the computer. so what is this process, is it part of windows? and why does it run on the computer? this article will explain your questions.
- Install the client (Client) for ISAafter installation is complete, isa automatically creates a share folder named mspclnt on the server. from your client to network neighborhood (win9x, winme), my network places (winxp, win2000). you must create a user with log on access to the server for clients. after logging into the server, go to the mspclnt directory and find the script called ms_fwc to install microsoft firewall client software (mfc) for the clients. (figure 1)
- Install and configure Windows Home Servertoday we will introduce you to windows home server and show you how to install and configure it with other computers on your network.
- Configure Print Driver in Windows Server 2012if you want to add additional drivers to help your clients easily install the printer. please follow the steps below to configure the print driver in windows server 2012.
- How to install DNS Server on Windows Server 2019from microsoft, the domain name system (dns) is one of the industry standard protocol sets that includes tcp / ip, along with dns client and dns server that provide name resolution services that map names to the ip addresses of computers. .
- How to install and configure backups in Windows Server 2012in this article, we will learn how to install and configure backups, which are not too different from previous versions.
- Creating SSL Server 2008 Server with ISA 2006 Firewalls (Part 2)in this section, we will configure a user account that allows dialup access, and then configure this cdp to allow anonymous http connections.
- How to Enable Cross Origin Resource Sharing (CORS) for Sharing Resource Using Apache Servers, PHP and Jqueryall kinds of interaction on web involve either a client side or a server side. the client side (usually a web browser) launches a request for some resource on server and the server side (usually a php or asp) gives a response back. if the...
- How to create a VPN server on Windows without using software?windows integrates functionality as a vpn server even if this option is hidden. this trick applies to both windows 7 and windows 8. this server uses tunneling protocols from point to point.