Working with NTP via Powershell on Windows
Start and stop time service
net start w32time
net stop w32time
start-service w32time
stop-service w32time
Specify the server with which to synchronize time
Check if time is synchronized with Microsoft’s public ntp server.
w32tm /stripchart /computer:time.windows.com /samples:4 /dataonly
Choose trusted time source
Synchronize with this server assuming it as trusted time source.
w32tm /config /manualpeerlist: time.windows.com /syncfromflags:manual /reliable:yes /update
Synchronize with multiple time sources
If you need to synchronize with several different time sources, the command will look like this:
w32tm /config /manualpeerlist:"server 0.nz.pool.ntp.org server 1.nz.pool.ntp.org server 2.nz.pool.ntp.org server 3.nz.pool.ntp.org" /syncfromflags:MANUAL /reliable:yes /update
Other commands
w32tm /query /status
w32tm / debug / enable / file: C: \ \ / size: 10485760 / entries: 0-300
w32tm /debug /disable
w32tm /resync
w32tm /unregister
w32tm /register
New Zealand time servers
- nz.pool.ntp.org We need more servers in this country. If you have a server with a static IP, please consider joining the pool!
To use this specific pool zone, add the following to your ntp.conf file:
server 0.nz.pool.ntp.org
server 1.nz.pool.ntp.org
server 2.nz.pool.ntp.org
server 3.nz.pool.ntp.org
In most cases it's best to use pool.ntp.org
to find an NTP server (or 0.pool.ntp.org, 1.pool.ntp.org, etc if you need multiple server names). The system will try finding the closest available servers for you. If you distribute software or equipment that uses NTP, please see our information for vendors.
Top comments (0)