net time


net time

Synchronizes the clock on the local machine with a time server.

Syntax

 net time [\   computername   /domain[:   domainname   ]   /rtsdomain[:   domainname   ] ] [/set] net time [\   computername   ] /querysntp net time [\computername] /setsntp[:ntp server list] 

Options

None

A display of the current date and time on the time server

\\computername

The time server for the domain (can be any WS2003 computer)

/domain[:domainname]

The domain where the time server resides

/rtsdomain[:domainname]

The domain where a Reliable Time Server resides

/set

An option forcing synchronization to occur

/querysntp

The name of the Network Time Protocol (NTP) server for the domain

/setsntp[:ntp server list]

A list of IP addresses or DNS names of NTP time servers for the domain

Examples

Synchronize the clock on the local machine with time server BACH :

  net time \bach /set  Current time at \bach is 6/26/2003 11:18 PM The current local clock is 6/26/2003 11:16 PM Do you want to set the local computer's time to match    the time at \bach? (Y/N) [Y]:  y  The command completed successfully. 

Verify that the previous command worked:

  net time  Current time at \TEST is 6/26/2003 11:18 PM The command completed successfully. 

Notes

  • Synchronization of clocks is important for activities such as directory replication to function properly. (Updates are timestamped to resolve collisions.)

  • Use net time \\ timeserver /set /yes in a logon script to synchronize the clocks of all machines with timeserver , which should have a reliable clock itself.

  • /s no longer works for /set as it did in Windows NT.

See Also

date , time



Windows Server 2003 in a Nutshell
Windows Server 2003 in a Nutshell
ISBN: 0596004044
EAN: 2147483647
Year: 2003
Pages: 415
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net