I have a server which is in a workgroup in a separate network from the rest of the domain. As a result, it cannot use the domain controllers as a time source. The server is a Windows Server 2012 R2 machine.
I'd like to ensure the server is configured to retrieve its time from a list of reliable NTP servers that are within my country, but I'm having some difficulty working out how best to configure this.
My first thought was to configure the machine in much the same way you would configure your PDC in a domain environment so it gets its time from one or more external time sources. The command line would look something like the following:
w32tm /configure /manualpeerlist:"ntp1.npl.co.uk ntp2.npl.co.uk" /syncfromflags:manual /update
This sets the appropriate registry values in the
Unfortunately that command fails because the 'Windows Time' (AKA w32time) service isn't started. Investigation reveals that on a non-domain-joined server, the Windows Time Service is set to 'Manual (Trigger Start)', with the trigger being whether the machine is joined to a domain. Since it isn't, the service hasn't started.
Since the service isn't running, you might think that means configuring w32time to use specific NTP servers would do nothing. However, there's also a built-in scheduled task named
SynchronizeTime located in
Task Scheduler Library\Microsoft\Windows\Time Synchronization\SynchronizeTime that starts the w32time service with the
task_started argument. This seems to cause the service to start, synchronise and then immediately stop again. What's even more odd is that the task has no triggers, yet it does run periodically. I can't find any way of determining what causes the task to run.
To further add to the confusion, there's also the setting you see in the Date and Time dialog on the 'Internet Time' tab:
It appears this setting relates to a completely different registry key that also contains a list of NTP servers. The key is:
So, all of the above has left me wondering just what is the correct way to achieve what I want to do. I'd also be interested in know the answers to any of these questions:
- Why are there two systems that appear to do the same thing?
- How does the second one work?
- How do they interact?
- Which should I be using?
- How is the scheduled task triggered?