Windows Client time Update script NTP

Source: Internet
Author: User
Tags aliyun

Windows XP Client time update script NTP

:: Windows XP Client time Update script NTP reg ADD "HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/ve/t reg_sz/d 3/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 1/t reg_sz/d time.windows.com/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 2/t reg_sz/d time.nist.gov/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 3/t reg_sz/d time1.aliyun.com/freg Add" Hkey_local_machine\system\currentcontrolset\services\w32time\Parameters"/V ntpserver/t reg_sz/d time1.aliyun.com/freg Add "Hkey_local_machine\system \currentcontrolset\services\ W32time\timeproviders\ntpclient "/V specialpollinterval/t reg_dword/d 3600/FSC config w32time start= autonet time/setsntp:time1.aliyun.comping-n 3 127.0.0.1 >nulnet stop W32 Timeping-n 3 127.0.0.1 >nulnet start w32timeping-n 3 127.0.0.1 >nulw32tm/resync             

Windows 7,10 Client Time update script NTP (run as Administrator)

:: Windows 7,10 Client time update script NTP (run as Administrator) REG ADD "HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/ve/t reg_sz/d 3/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 1/t reg_sz/d time.windows.com/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 2/t reg_sz/d time.nist.gov/freg Add" HKEY_LOCAL_MACHINE\software\microsoft\ windows\CurrentVersion\datetime\servers "/V 3/t reg_sz/d time1.aliyun.com/freg Add" HKEY_LOCAL_MACHINE\system\currentcontrolset\services\w32time\parameters "/V ntpserver/t reg_sz/d Time1.aliyun.com/freg Add "HKEY_LOCAL_MACHINE\system\currentcontrolset\services\w32time\ Timeproviders\ntpclient "/v specialpollinterval/t reg_dword/d 3600/FSC config w32time start= autoping-n 3 127.0.0 .1 >nulnet Stop w32timeping-n 3 127.0.0.1 >nulnet start w32timeping-n 3 127.0.0.1 >nulw32tm/config/manualpeer List: "Time1.aliyun.com"/syncfromflags:manual/reliable:yes/updateping-n 3 127.0.0.1 >nulw32tm/resync


An NTP server is required when using NTP to synchronize the time function;

This article describes some of the settings that are required when you use computer windows as a server for NTP synchronization time

Tools/Materials
    • Computer

    • Windows operating system

Method/Step
  1. 1

    On the desktop, right-click computer ,

    Select " Manage ",

    Then select Services .

    Specific

  2. 2

    Select Windows Time, set to on so that the Windows Time service can be opened.

  3. 3

    "Start"-"Run"-enter "regedit" to open the registry.

  4. 4

    Find NetServer This item, see the illustrations, the inside is very detailed.

  5. 5

    Set the value of NetServer under Enabled to 1.

  6. 6

    Restart the computer system, you can use the computer as an NTP server.

    P.S: Enter w32tm in cmd to view related commands.

    Main parameter Description:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

    NtpServer Set the clock Server (IP), which must be appended to, 0x1 after each DNS name .

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval

    MaxPosPhaseCorrection and maxnegphasecorrection The maximum calibration time range, that is, when the computer time is faster or slower than the value, no calibration is recorded and the event is logged.

    Hkey_local_machine\system\currentcontrolset\services\w32time\config

    Maxallowedphaseoffset attempts to calibrate the maximum offset, that is, when the computer time difference is greater than this value, the direct synchronization, when the difference is less than this value, the Times in 0.05-second progressive slow synchronization.

    Restart required after configuration, W32TM service

    net stop W32Time && net start W32Time

    Windows Time Service registry key

    The following registry key is located under Hkey_local_machine\system\currentcontrolset\services\w32time\:

    Registry key MaxPosPhaseCorrection
    Path Hkey_local_machine\system\currentcontrolset\services\w32time\config
    Attention This item specifies the maximum positive time calibration (in seconds) that the service can perform. If the service determines that a change amplitude is greater than the desired amplitude, it logs an event. (0xFFFFFFFF is a special case, it means always calibration time.) The default value for domain members is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000, which is 15 hours.
    Registry key MaxNegPhaseCorrection
    Path Hkey_local_machine\system\currentcontrolset\services\w32time\config
    Attention This specifies the maximum amount of negative time calibration (in seconds) that the service can perform. If the service determines that a change is greater than the desired amplitude, it will instead log an event. (-1 is a special case, it means always calibration time.) The default value for domain members is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000, which is 15 hours.
    Registry key Maxpollinterval
    Path Hkey_local_machine\system\currentcontrolset\services\w32time\config
    Attention: This entry specifies the maximum interval allowed for the system polling interval (in units of seconds in logarithmic notation). Although the system must poll on a predetermined interval, the provider can reject the build sample on request. The default value for domain members is 10. The default value for stand-alone clients and servers is 15.
    Registry key SpecialPollInterval
    Path Hkey_local_machine\system\currentcontrolset\services\w32time\timeproviders\ntpclient
    Attention: This entry specifies the special polling interval (in seconds) for the manual peer. When the Specialinterval 0x1 flag is enabled, W32Time uses this polling interval rather than the polling interval determined by the operating system. The default value for domain members is 3,600. The default value for stand-alone clients and servers is 604,800.
    Registry key Maxallowedphaseoffset
    Path Hkey_local_machine\system\currentcontrolset\services\w32time\config
    Attention: This entry specifies the maximum offset (in seconds) that W32Time attempts to adjust the computer clock using the clock rate. When the offset is greater than this rate, the W32Time sets the computer clock directly. The default value for domain members is 300. The default value for stand-alone clients and servers is 1.
              

Windows Client time update script NTP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.