Enabling NTP service on Windows Server 2008 / 2008R2

Setting time server on Windows Server 2008 or 2008 R2 appears to be still difficult for some administrators. For this reason I have decided to write on my blog how to set it from command prompt. It exists also a version to modify the same settings from registry, but I prefer other ways.
If you want to set time services, the command prompt must be opened as administrator. There you must write some commands:

  • w32tm /config /manualpeerlist:ntp1.arnes.si /syncfromflags:MANUAL /reliable:yes – this command will configure the NTP server to ntp1.arnes.si (of course you can use other servers) and set the synchronization. Switch syncfromflags has two options MANUAL if you synchronize from the manual peer list (in our case), or DOMHIER if you want to synchronize from the DC (this of course exclude manualpeerlist switch). Switch Reliable sets this computer as a reliable time service.
  • w32tm /config /update – of course you must update the configuration and this is done in this step.
  • net stop w32time and net start w32time – you must restart the time service for applying the use of the desired configuration.
  • w32tm /resync /rediscover – this step is an optional, but is very good for testing. The only thing we do here is forcing the synchronization. This is very nice to test if everything is OK.

This are commands to set NTP time server, but don’t forget that the NTP server must be reachable from your computer. There are a lot of errors in this step,so put a look to firewalls if the port UDP 123 is open. The list of NTP servers is here. You will found one that is OK for you.

Recommended Reading

Discuss

Your email address will not be published. Required fields are marked *