Command for time sync and troubleshooting

By | June 29, 2010

Active Directory authentication depends on the server time, if any issue with the server time then user can’t able to login to that server, we have to check the server time, if it’s a member server or client computer we can use the net time command to check and fix the time issue

Also See: Compare the system time with other server
Syntax:

Net time /domain:domain name /set

Example:

Net time /domain:domain.com /set

This command will check the local system time with corresponding domain controller,

Result of this command will show the current time on both (member server / client computer with the domain controller) if we require, we can synchronise the time with the domain controller

Note: if you have more time difference then this command can’t synchronise the time, you have to change the time manually, if require change the time in system BIOS

The above procedure only for member servers and client computer, if you want to check and synchronise time on domain controller, we can’t use the net time command because net time command check the system time with corresponding authenticated domain controller, if you run net time command on domain controller, command will compare the local time with local time

For example if you run this command on test01 it will synchronise with the test01 (same server since it a domain controller) so we have to use w32tm command,

Use the below command to synchronise time on Domain Controller

w32tm /resync

To check the current time source

Net time /QUERYSNTP

In the above command you will get the current time source, in member server you will get the PDC emulator server name, in PDC emulator server you will get the external time source name depended on your configuration, you can also use W32tm command to configure this

Also See: Understanding the time zone configuration in windows

Type the following command to configure the PDC emulator and then press ENTER:

w32tm /config /manualpeerlist:Servername /syncfromflags:manual /reliable:yes /update

To configure a client computer for automatic domain time synchronization

w32tm /config /syncfromflags:domhier /update

Below command will watch an attempt to sync this computer to its time source, but does not actually change the time. This shows where in the process the time service client is failing

w32tm -once -test –v

Related Articles

Dfference between time

Compare server time

Time Service in Windows

Leave a Reply

Your email address will not be published. Required fields are marked *