2014-04-04 3 views
19

Windows 7에서 작업하고 있습니다. ntp Linux 서버에서 win7의 시간을 수동으로 동기화 할 수 있습니다. 명령 프롬프트에서 어떻게 할 수 있습니까? 그래서 나는 윈도우 시작에 그것을 실행할 수 있습니다. 그리고 Windows 작업 계획은 나를 위해 작동하지 않습니다. 시간은 다음과 같아야합니다.명령에서 ntp 시간 서버에서 Windows 시간을 동기화하는 방법

Linux server --> windows 7. 

누구도 알고있을 것입니다. 고맙습니다. 나는 msdn을 읽을 수있다.

답변

22

의견이 evelated 프롬프트에서이 하나의 시도를 사용하여 순 시간 net time \\timesrv /set /yes

후 :

w32tm /config /update /manualpeerlist:yourtimerserver 
+0

서비스가 나는 w32time을 시작 SC 실행 한 @Kayasax를 시작할 수 없습니다 : 당신은 그냥 resync 윈도우 시간이 필요한 경우은과 같이 입력 상승 된 명령을 엽니 다. Windows 시간 서비스가 이미 시작되었습니다. –

+0

@ Nikick 대답 업데이트 –

+0

오류없이 성공적으로 실행됩니다. 그러나 시간은 변하지 않았습니다. 나는'time/t'을 실행할 때. 그것은 나를 미치게 만든다. @ Kayasax –

30
net stop w32time 
    w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org" 
    net start w32time 
    w32tm /config /update 
    w32tm /resync /rediscover 

.BAT 샘플 파일 : https://gist.github.com/thedom85/dbeb58627adfb3d5c3af

또한이 프로그램을 추천 : http://www.timesynctool.com/

+2

'timesynctool' 참조 주셔서 감사합니다, 그냥 내가 뭘 필요합니다. – kmonsoor

3
w32tm /resync 

C:\WINDOWS\system32>w32tm /resync 
Sending resync command to local computer 
The command completed successfully.