Time Sync Configuration in Active Directory
Table of Contents
Active Directory Windows Time Service
This is enhanced ver of old Microsoft Article
Why time sync in active directory is important? #
- If client computer time out of sync from DC more than 5 min , Kerberos will not work, and DC will refuse to issue TGT :)
- Also DC’s resolve replication conflict by comparing time.
- Business applications record operations time stamp ,and not synced time create issues, specially on Banks & governmental environment.
You have 3 Options to set windows Time service setting
- Registry : Not recommended to directly edit Registry.
- Commands : you will execute w32tm command on each computer.
- Group Policy : Prefeared to automate the setting.
Configure Windows Time Service by w32tm Command: #
- On PDC execute command :
w32tm /config /manualpeerlist: time.windows.com:0x9 /syncfromflags:manual /reliable:yes /update
- On all other DC’s , Member servers & Domain computers
w32tm /config /syncfromflags:domhier /update
When move PDC FSMO : you have to run this commands on old and new PDC.
Configure Windows Time Service by Group Policy #
We will create 2 GPO’s each one with WMI filter, Open Group Policy Management console :
Create WMI filter name it PDC with value:
Select * from Win32_ComputerSystem where DomainRole = 5
this will be true only if computer is DC and have PDC FSMO.Create WMI filter name it NOT PDC with value:
Select * from Win32_ComputerSystem where DomainRole <> 5
this will be true on all other computers other that DC with PDC FSMO.Create New GPO Name it TimeSync for PDC and edit, goto this path:
Computer Configuration\Administrative Templates\System\Windows Time Service\Time Providers
double clickConfigure Windows NTP Client
keepNtpServer
as defult and changeType
= NTP , Then Enable Windows NTP Client.Create New GPO Name it TimeSync for All and edit, goto this path:
Computer Configuration\Administrative Templates\System\Windows Time Service\Time Providers
double clickConfigure Windows NTP Client
keepNtpServer
as default and changeType
= NT5DS, Then Enable Windows NTP Client.Link GPO TimeSync for All to domain top level and force it .
Link GPO TimeSync for PDC to
Domain Controllers
OU.
When move PDC FSMO : Setting will correct after automate or manually group policy.
Test configuration: #
PDC #
- On
PDC
force Group Policy updateGpupdate /force
- Force time sync
w32tm /resync /rediscover
- Check status & last sync
w32tm /query /status
source must betime.windows.com
- Check effective configuration
w32tm /query /configuration
Other DC #
- On any
DC
,force Group Policy updateGpupdate /force
- Force time sync
w32tm /resync /rediscover
- Check status & last sync
w32tm /query /status
source must be thePDC
. - Check effective configuration
w32tm /query /configuration
Any Member server or workstation #
- On any other computer,force Group Policy update
Gpupdate /force
- Force time sync
w32tm /resync /rediscover
- Check status & last sync
w32tm /query /status
source must be anyDC
. - Check effective configuration
w32tm /query /configuration