Windows Server 2003 in a Nutshell

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

See Also

date , time

Категории