User Tools

Site Tools


microsoft:windows:timeservice

Microsoft - Windows - Time Service

Documentation

Blogs

Blogposts/Articles

Microsoft Support KB articles

Enable logging for the W32Time service

Import:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Parameters]
"WriteLog"="True"
"Log"=dword:00000064

And restart the Windows Time service.
Source:Microsoft Support - Configuring the Time Service to Log When the Time Is Changed

0x1, 0x2, 0x4, 0x8, etc.

As suffix to the name or the IP address of:

  • /manualpeerlist: (w32tm)
  • /setsntp (net time)

You can add an extra value for the NTP packet type:

0x01SpecialInterval
0x02UseAsFallbackOnly
0x04SymmatricActive
0x08Client

Sources:
Microsoft Support - How to configure an authoritative time server in Windows Server (KB816042) zie onder “More Information”.
TechNet - Windows Time Service Tools and Settings see the description of the NtpServer registry key.

Configure standalone Windows Server as NTP Server

// Tested on Windows Server 2012 R2 Standard. //

REM Configure the Windows Time service to sync with two NTP servers
"%SYSTEMROOT%\system32\w32tm.exe" /config /manualpeerlist:"0.nl.pool.ntp.org 1.nl.pool.ntp.org " /syncfromflags:manual /reliable:yes /update

REM Configure the Windows Time service to auto-start
"%SYSTEMROOT%\system32\sc.exe" config W32Time start=auto

REM Enable the NTP Server component of W32Time
REM 	http://www.techrepublic.com/blog/the-enterprise-cloud/configure-a-standalone-ntp-server-in-windows-server/
"%SYSTEMROOT%\system32\reg.exe" ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v Enabled /t REG_DWORD /d 1 /f

REM Stop and start the Windows Time service.
"%SYSTEMROOT%\system32\sc.exe" stop W32Time 
"%SYSTEMROOT%\system32\sc.exe" start W32Time 

REM Query config
"%SYSTEMROOT%\system32\w32tm.exe" /query /configuration

REM Add a firewall rule allowing UDP/123 incoming
%systemroot%\system32\netsh.exe advfirewall firewall add rule name="NTP Server" dir=in action=allow protocol=UDP localport=123

REM If this is a domain member server, Windows Time service shows "Automatic (Trigger Start)" as status in services.msc.
REM	https://www.coretechnologies.com/products/ServiceTriggerEditor/sc.html
REM Check trigger parameters
"%SYSTEMROOT%\system32\sc.exe" qtriggerinfo W32Time

REM Remove the trigger parameters
"%SYSTEMROOT%\system32\sc.exe" triggerinfo W32Time delete

Sources:

microsoft/windows/timeservice.txt · Last modified: by bas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki