Link to home
Start Free TrialLog in
Avatar of HB-IT
HB-IT

asked on

Create Batch FIle to update time

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.  
Avatar of morpheios
morpheios
Flag of Russian Federation image

w32tm /config /syncfromflags:manual /manualpeerlist:PeerList
w32tm /config /update
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
Avatar of x3man
x3man

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.
Avatar of HB-IT

ASKER

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
w32tm /config /syncfromflags:manual /manualpeerlist:64.90.182.55,nist1-ny.ustiming.org
w32tm /config /update
Avatar of HB-IT

ASKER

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)

ASKER CERTIFIED SOLUTION
Avatar of morpheios
morpheios
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HB-IT

ASKER

you rock now to just set this as a service and ill be set.
Avatar of HB-IT

ASKER

Perfect Answer