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


this link seems more reliable


Command to check time/timezone on remote Windows PC

all commands should be executed using administrative privileged account.

net time \\REMOTEPC
#OR using pstools
psexec \\pc01 cmd
#then use
echo %date% %time% & tzutil /g
#Or if you want to output them in a single line:
for /f "tokens=*" %i in ('tzutil /g') do echo %date% %time% %i
# System information general
systeminfo /s \\pc01
#find timezone
systeminfo /s \\pc01 | findstr  /C:"Time Zone"
#find OS
systeminfo /s \\pc01 |findstr /i "host OS "

Adding external NTP server on domain Controllers


If you have multiple DC, set time on main DC which holds PDC role , check this on all DC by

query fsmo

then on your primary DC, issue following

#Set NTP on PDC (Primary Domain Controller)

<span style="color:var(--color-text);">w32tm /config / /syncfromflags:manual /reliable:yes /update
</span>net stop w32time
net start w32time

# Confirm if your server is properly configured:
w32tm /monitor
w32tm /query /status

2#ADC – Addition , other domain controllers NPT Config

On other additional DC’s and client, use

w32tm /config /syncfromflags:domhier /update
net stop w32time && net start w32time

After few minutes issue, issue

w32tm /query /status

on PDc, it should be something like

C:\>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.2702419s
Root Dispersion: 0.1090715s
ReferenceId: 0x85F3EEA3 (source IP:
Last Successful Sync Time: 9/27/2018 10:13:35 AM
Poll Interval: 10 (1024s)

on ADc or other domain controller , it should be something like

C:\Windows\system32>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 4 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.3660090s
Root Dispersion: 0.1337182s
ReferenceId: 0x650B0B05 (source IP: # this is PDC server IP
Last Successful Sync Time: 8/26/2019 2:43:35 PM
Poll Interval: 10 (1024s)

Some helpful w32tm commands:

#Force synchronizing the time asap
w32tm /resync /nowait

Check NTP configuration
w32tm /query /configuration

w32tm /query /source
Display time source

w32tm /query /peers
Display list of all configured NTP servers and their status

w32tm /query /status
Display time service status i.e whether it is getting time from local cmso clock/external NTP server

# Extra Commands

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

setrtime.bat REMOTEPCNAME

%d bloggers like this: