Set Time in Login Script

I'm using a visual basic script to map network drives during login.  How can I also set time on the client machines in the login, such as you can do with Netware login scripts?
Randyp53Asked:
Who is Participating?
 
ShineOnCommented:
If you've got an AD domain, the third way is to force the time synchronization using Group Policy...  That way, nothing has to be "executed" as a script during login - it's just a GPO update.

That group policy object can point to specific DC's as time sources or can point to a non-Windows time source or whatever else you want it to do.  You have to understand how the windows time service works, though.
0
 
sirbountyCommented:
Dim objShell:Set objShell=CreateObject("Wscript.Shell")
objShell.Run "net time \\servername /set"
0
 
Brian PiercePhotographerCommented:
If your clients are on a domain they will automatically sync their time with the PDC Emulator on the Domain Controller so this will be unnecessary
0
 
vnicolaeCommented:
Both answers are correct. KCTS' answer only apply in an Windows 2000/2003 domain with a Windows 2000/XP client.

If the domain is NT4, you'll have to use the logon script (see sirbounty's answer). However, the user that logs on will have to be a local administrator.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.