[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Create Batch FIle to update time

Posted on 2011-10-19
10
Medium Priority
?
683 Views
Last Modified: 2012-05-12
Hello I need a batch file created that lets me set a task to update the time on our server to internet time aka google clock.  Please help.  
0
Comment
Question by:HB-IT
  • 5
  • 4
10 Comments
 
LVL 6

Expert Comment

by:morpheios
ID: 36992570
w32tm /config /syncfromflags:manual /manualpeerlist:PeerList
w32tm /config /update
0
 
LVL 6

Expert Comment

by:morpheios
ID: 36992576
w32tm /config /syncfromflags:manual /manualpeerlist:PeerList
w32tm /config /update

where PeerList is a comma-separated list of Domain Name System (DNS) names or Internet protocol (IP) addresses of the desired time sources
0
 
LVL 9

Expert Comment

by:x3man
ID: 36992584
See: http://support.microsoft.com/kb/816042
Under "Configuring the Windows Time service to use an external time source"

Not entirely sure what you're after but this will allow you to set your dc to use external (internet) time service.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:HB-IT
ID: 36992587
ok so i would put this
w32tm /config /syncfromflags:manual /manualpeerlist:PeerList
w32tm /config /update

nist1-ny.ustiming.org
64.90.182.55
where would i put these
0
 
LVL 6

Expert Comment

by:morpheios
ID: 36992591
0
 
LVL 6

Expert Comment

by:morpheios
ID: 36992600
w32tm /config /syncfromflags:manual /manualpeerlist:64.90.182.55,nist1-ny.ustiming.org
w32tm /config /update
0
 

Author Comment

by:HB-IT
ID: 36992640
how would i write that into a batch file though.

Echo

w32tm /config /syncfromflags:manual /manualpeerlist:64.90.182.55,nist1-ny.ustiming.org
(Enter)

w32tm /config /update
(Enter)

0
 
LVL 6

Accepted Solution

by:
morpheios earned 2000 total points
ID: 36992652
Run notepad then copy

@Echo off
w32tm /config /syncfromflags:manual /manualpeerlist:64.90.182.55,nist1-ny.ustiming.org
w32tm /config /update

and finaly save file File - Save As - (select all files, not TXT) - give name sync_time.bat
0
 

Author Comment

by:HB-IT
ID: 36992660
you rock now to just set this as a service and ill be set.
0
 

Author Closing Comment

by:HB-IT
ID: 36992663
Perfect Answer
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
It is a real story and is one of my scariest tech experiences. Most users think that IT experts like us know how to fix all computer problems. However, if there is a time constraint and you MUST not fail the task or you will lose your job, a simple …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

830 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