setting time from internet using command line

G

Gary Roach

i'm trying to set the time using a ntp server from the command line. i'm
doing:

net time /setsntp:time.microsoft.com
net time /set

the first command succeeds. the second fails with:

Could not locate a time-server.

More help is available by typing NET HELPMSG 3912.

the helpmsg is just : 'Could not locate a time-server.'

when i look at the traffic on the link, there aren't any packets being sent
as a result of the second command. no wonder it can't find a server! anybody
know how to do this? i need to do it on the command line. any help is
greatly appreciated.

gary
 
R

Russell

-----Original Message-----
i'm trying to set the time using a ntp server from the command line. i'm
doing:

net time /setsntp:time.microsoft.com
net time /set

the first command succeeds. the second fails with:

Could not locate a time-server.

More help is available by typing NET HELPMSG 3912.

the helpmsg is just : 'Could not locate a time-server.'

The command you used can only be used to get a time from a
domain controler. Only a domain controller can be set up
to get a time from an external source.

The command you should of used is w32tm. Full infomation
below.

How to Synchronize an Internal Time Server with an
External Source
Click Start, point to All Programs, point to Accessories,
and then click Command Prompt.
Type the following line, where peerlist is a comma-
separated list of Domain Name System (DNS) names or IP
addresses of the appropriate time sources, and then press
ENTER:
w32tm /config /syncfromflags:manual /manualpeerlist:peerlis
t

Type w32tm /config /update, and then press ENTER
 
G

Gary Roach

worked great! thanks for the help.


Russell said:
The command you used can only be used to get a time from a
domain controler. Only a domain controller can be set up
to get a time from an external source.

The command you should of used is w32tm. Full infomation
below.

How to Synchronize an Internal Time Server with an
External Source
Click Start, point to All Programs, point to Accessories,
and then click Command Prompt.
Type the following line, where peerlist is a comma-
separated list of Domain Name System (DNS) names or IP
addresses of the appropriate time sources, and then press
ENTER:
w32tm /config /syncfromflags:manual /manualpeerlist:peerlis
t

Type w32tm /config /update, and then press ENTER
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top