net time |
Synchronizes the clock on the local machine with a time server.
net time [\ computername /domain[: domainname ] /rtsdomain[: domainname ] ] [/set] net time [\ computername ] /querysntp net time [\computername] /setsntp[:ntp server list]
A display of the current date and time on the time server
The time server for the domain (can be any WS2003 computer)
The domain where the time server resides
The domain where a Reliable Time Server resides
An option forcing synchronization to occur
The name of the Network Time Protocol (NTP) server for the domain
A list of IP addresses or DNS names of NTP time servers for the domain
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.
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.
date , time