Discussion Locked

Net Time query

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to add the net time command into a logon script in XP Pro, so the pcs will pick up the time autoamatically from the server.
It runs o.k from the run option & dos but comes up with a syntax error when added to the script file.

5 replies

by lumberjack

The correct syntax should be

Net time \\computername /SET
or
Net Time /DOMAIN:domainname /SET

if that doesn't work - try it with the /Y parameter at the end of the line

by madestroitsolutions

In a network with different network client software, different workgroups, and different domains, maintaining a logon script that issues a NET TIME command can become complex. Here is a simple solution to keep the time for all clients in the network synchronized:
This problem can be solved by either running a logon script for each workstation or by having each workstation run a batch file on their own after logging on to the network.

For example, assume you have a server named TIMESRV that has a reliable system clock. An example batch file that would run either from the workstation, or get called from or be part of a logon script, would look like this:
NET TIME \\TIMESRV /SET /YES

Using just a server name instead of the /DOMAIN or /WORKGROUP parameter avoids the complexity of maintaining different logon scripts or batch files for the different types of network client software. Please keep in mind that if all of your workstations are running the same type of network client software, you may choose instead to use the /DOMAIN or /WORKGROUP parameter. But, in a network with a variety of network client software, it might be easiest to use the "\\computername" (without quotation marks) parameter.

NET TIME is enabled by default on all Windows NT workstations and servers.

by rrv

Win XP has new way of synchronizing time with server. Use "w32tm" command. use /? to get its parameters and to set the server to synchronize. You can also synchronize with server in your domain or world time servers or microsoft time server. If you want this to be done only when the PC starts use Group policy editor "gpedit" in start\Run and set the time synchronization. Or you can use start\Run\SERVICES.MSC and check the time synchronization services running. Also you can download windowsXP power toy to manipulate such things.
All the best
RV

This discussion is closed to new replies.