Wednesday, October 25, 2006

Set NTP Server in Windows

Using an NTP server is the only way to keep your clock on your computer/server in correct time - bios clocks always seem so unreliable these days. Since I always forget the command to change/set the ntp server in Windows i thought i'd write it down:

net time /setsntp:ns1.server.com && net stop w32time && net start w32time

This command does three things in one - sets the ntp server address (change this to the appropriate one) - then restarts the Windows Time service. The '&&' characters enable you to execute multiple commands one one line.

If using Windows XP or Windows 2003 Server you'll see the NTP service synchronising in the event logs. If you don't have an NTP server and want one, do a Google for Public NTP servers and you'll come up with one you can use.

No comments: