Here's a small batch file that allows an administrator to remotely synchronize a workstation's time with the PDC...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
(primary domain controller) as the defualt domain user doesn't have the right to sync the time of the PC.
To sync the workstation time with the PDC, the admin will need to copy the small batch file FixTime.bat from below. Also, he or she will need the utility PsExec.exe from Sysinternals.com.
The contents of the batch file are as follows:
If .%1==. goto syntax
psexec %1 net time //domain:
echo * Invaild Argument *
echo Syntax :
echo Fixtime MachineName
This batch file needs to be executed from the same directory as the PsExec.exe or you can copy psexec.exe to a folder in the PATH variable so that it can be executed from any place. Also, the batch file takes into account that the net.exe and net1.exe files are available in the path variable of the remote PC.
Thats it. Just type:
And the machine's time will be synced with the PDC/BDC (backup domain controller) of the domain.Note:- As this command needs Admin privilege to execute, you will need to execute this batch file while logged on as a domain admin on your PC. Code: