Monday, June 17, 2024

Script for Remote Synchronization of Workstation’s Time with PDC

Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Here’s a small batch file from Karanjit Sidhu that allows the administrator to remotely synchronize a workstation’s time with the PDC (as the defualt domain user doesn’t have the right to sync the time of the PC). By default, SMS requires its client to have a time sync of inside of 300 seconds to work efficiently with it.

To sync the workstation time with the PDC, the admin will need to copy or download the small batch file FixTime.bat from below. Also, he or she will need the utility PsExec.exe from (direct download link for PSExec.exe). The admin will also require a temp Domain Admin account which can be disabled when not in use.

Download the FixTime.bat file.

SMS Scripts list.

The contents of the batch file are as follows:


@echo off
If .%1==. goto syntax
echo  % Invaild Argument %
echo  Syntax :
echo  Fixtime MachineName
goto end

rem Please replace  with username of a Domain Admin
rem Please replace  with password of the same account

psexec %1 - u  -p -d c:winntsystem32net time
/domain: /set /y
goto end


Disclaimer: We hope that the information in these pages is valuable to you. Your use of the information contained in these pages, however, is at your sole risk. All information on these pages is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by me. We shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

Subscribe to Data Insider

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more.

Similar articles

Get the Free Newsletter!

Subscribe to Data Insider for top news, trends & analysis

Latest Articles