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

SHORT NOTES FOR PERSONNEL REFERENCE ONLY

this link seems more reliable

https://community.spiceworks.com/how_to/65413-configure-dc-to-synchronize-time-with-external-ntp-server

 


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

1#PDC

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 /manualpeerlist:pool.ntp.org /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: 133.243.238.163)
Last Successful Sync Time: 9/27/2018 10:13:35 AM
Source: 1.pool.ntp.org
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: 10.0.0.1) # this is PDC server IP
Last Successful Sync Time: 8/26/2019 2:43:35 PM
Source: DC01.MYDOMAIN.LOCAL
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
cls
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

2 Comments »

  1. assallam allkum sir, i need the mikrotik ver 6.xx x86 OS with crack software please help me,

    i have the motherboard msi model ms-7418 is having mini e – pci express card option in pci card model aw-ge780. so i need the

    mini pci card drivers support mikrotik os.

    i am install mikrotik os ver 5.18 with crack. but the only is mini pci card drivers will not support …. how to solve this problem ?

    kindly send a mail i am waiting your reply,

    faiyazuddin Network Administrator, india. mob.919291597110

    On Wed, Nov 4, 2015 at 11:56 PM, Syed Jahanzaib Personal Blog to Share Knowledge ! wrote:

    > Syed Jahanzaib / Pinochio~:) posted: “SHORT NOTES FOR PERSONNEL REFERENCE > ONLY Command to check time on remote Windows PC. all commands should be > executed using administrative privileged account. Adding external NTP > server on DC Command for ” >

    Like

    Comment by faiyazuddin mohammed — June 4, 2016 @ 9:11 PM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: