Menü schliessen
Created: December 14th 2011
Categories: Windows Server 2008 (R2)
Author: Marcus Fleuti

How to configure the NTP client service "w32time" for Windows 2008 (R2) to automatically synchronize time with an online time server

Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

The goal: Automatically synchronize the time of a Microsoft Windows 2008 (R2) server via NTP with one or more online NTP servers.
This CMD batchfile activate_win32time_service_for_windows_servers.cmd (right click and save as a local file with the extension '.cmd' -> Execute as Administrator) automatically configures the Windows (Server 2008 R2) NTP service to use a list of online NTP servers for synchronizing its local time.
This is done by executing the following lines of code on a command shell:

@echo off
echo This script activates the automatic Timesync via NTP in Windows Server Systems
echo.
w32tm /config /update /manualpeerlist:"0.pool.ntp.org,0x8 1.pool.ntp.org,0x8 2.pool.ntp.org,0x8 3.pool.ntp.org,0x8" /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync