Problem:
When I tried to sync the time of my windows server through the Date and Time window from my NTP server I got the error shown below:
I also tried to sync the time of the windows server through the command line but again I got the error.
C:\Documents and Settings\admin>w32tm /config /manualpeerlist:10.20.2.10 /syncfromflags:MANUAL The command completed successfully. C:\Documents and Settings\admin>w32tm /config /update The following error occurred: The service has not been started. (0x80070426)
When I tried to start or stop the windows time service, I got the below error.
C:\Documents and Settings\admin>net start w32time System error 1058 has occurred.
Reason:
I was not able to sync the time of my windows server with the NTP server because the Windows time service was not registered on the windows server. Windows time service was not registered on this machine due to which I was not able to start the windows time service
Solution:
Run the below commands one by one on the command prompt.
- Run the command prompt as administrator.
- First, stop the windows time service, in my case, it was not running.
C:\Windows\system32>net stop w32time The Windows Time service is not started. More help is available by typing NET HELPMSG 3521.
- Register the windows time service by using the below command.
C:\Windows\system32>W32TM /Register W32Time successfully registered.
If you get the error like “The following error occurred: Access is denied. (0x80070005)” then it might be due to the reason that you have not opened the command prompt as administrator.
- Now start the windows time service using the below command and it should start successfully.
C:\Windows\system32>net start w32time The Windows Time service is starting. The Windows Time service was started successfully.
Note: In this case, the client machine was a Windows Server 2003 and the NTP server was an RHEL 6.8 machine.