Blog

Blog

 
     

How to resolve incorrect time settings on Windows Server

Mai 28 2016

There are a lot of administrators complaining about a small time shift (e.g. 12  minutes) between server time and the current real time and of course there are a lot of solutions to this issues:

  • use the control panel with administrator privileges
  • just set the time a ridiculous amount ahead or past the current time
  • use powershell to configure NTP (Network Time Protocol)
  • check firewalls on PDC (primary domain controller)

But before you fumble with powershell you have to answer just one question: Is the affected server virtualized?

In this case it's useless to set adjust the NTP settings on this server.

You may check your NTP settings by starting an elevated powershell command prompt and run: w32tm /query /status

PS C:\Windows\system32> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 0.0100000s
ReferenceId: 0x564D5450 (source IP:  86.77.84.80)
Last Successful Sync Time: 28.05.2016 00:45:27
Source: VM IC Time Synchronization Provider
Poll Interval: 6 (64s)

"VM IC Time Synchronization Provder" indicates you have to adjust the NTP on your VM Host (e.g. Hyper-V Serer).

Now log on to your VM Host (VMWare / Hyper-V Server) and open an elevated powershell command prompt:

  1. net stop w32time
  2. w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org”
  3. w32tm /config /reliable:yes
  4. net start w32time

Additional useful commands are:

  • w32tm /query /configuration
  • w32tm /resyncw32tm /query /status
  • dsquery server -hasfsmo pdc

Subjects

Archive