Solved

Set Time in Login Script

Posted on 2007-03-29
4
763 Views
Last Modified: 2008-05-30
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?
0
Comment
Question by:Randyp53
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18817467
Dim objShell:Set objShell=CreateObject("Wscript.Shell")
objShell.Run "net time \\servername /set"
0
 
LVL 70

Expert Comment

by:KCTS
ID: 18817704
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
 
LVL 4

Expert Comment

by:vnicolae
ID: 18818361
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
 
LVL 35

Accepted Solution

by:
ShineOn earned 250 total points
ID: 18818951
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

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question