Syed Jahanzaib Personal Blog to Share Knowledge !

November 5, 2015

Adding External NTP Server in Domain Controller / Short Notes

Filed under: Microsoft Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 12:56 PM


Command to check time on remote Windows PC.

all commands should be executed using administrative privileged account.

net time \\REMOTEPC


Adding external NTP server on DC

# Set NTP on DC / on server

w32tm /config /manualpeerlist:",0x1,0x1 "

w32tm /config /reliable:yes

net stop w32time && net start w32time


Command for client side windows , to force update time from DC

I added this file in GP so that every computer on reboot is forced to update time via server

# For client
net time \\DC_SERVER /set /y


Using PSTOOLS to execute command on remote PC.

# run command on remote computer.
PsExec.exe \\$1 -u DOMAIN\ADMIN -p PASS cmd "/c net time \\DC_SERVER /set /y"


Force client update from your admin PC forcefully.

I sued following script / batch file [named setrtime.bat] to manually update time on remote pc via remote, and show before/after time.

@echo off
echo Current time of %1
echo -------------------------
net time \\%1
echo -------------------------
PsExec.exe \\%1 -u DOMAIN\ADMIN -p PASS cmd "/c net time \\DC_SERVER /set /y"
echo -------------------------
echo Current time of %1 AFTER CHANGING
net time \\%1

now use it like

netrtime.bat REMOTEPCNAME


%d bloggers like this: