Board logo

标题: 有没有和服务器时间进行校对的命令或者脚本? [打印本页]

作者: leewger     时间: 2007-10-13 11:09    标题: 有没有和服务器时间进行校对的命令或者脚本?

一台客户端,怎么样可以用开机批处理和服务器对时?
比如服务器是192.168.1.1,客户端是192.168.1.10
作者: HAT     时间: 2007-10-13 11:56
查看服务器时间:

  Quote:
C:\>net time /?
The syntax of this command is:


NET TIME
[\\computername | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET]
         [\\computername] /QUERYSNTP
         [\\computername] /SETSNTP[:ntp server list]

修改本机时间:

  Quote:
C:\>time /?
Displays or sets the system time.

TIME [/T | time]

Type TIME with no parameters to display the current time setting and a prompt
for a new one.  Press ENTER to keep the same time.

If Command Extensions are enabled the TIME command supports
the /T switch which tells the command to just output the
current time, without prompting for a new time.