Tuesday 30 August 2016

Time Configuration in Active Directory

Run the following command on the PDC emulator:  
1)      w32tm /query /source
Free-running System Clock
2)      w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update
3)      w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /reliable:yes /update
3)    w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" /reliable:yes /update
4)      Services > Windows Time > Restart (restart W32Time service)
5)   w32tm /query /peers
7    w32tm /resync
==========================================================
Optional:
Run the following command on all other DCs (that are not PDC):  
w32tm /config /syncfromflags:domhier /update
Once done, restart W32Time service.
net stop w32time && net start w32time
 #Both the domain and non-domain joined protocols requires UDP port 123. 
==========================================================
reset the time service on the non-PDCs back to their default:
net stop w32Time
w32tm /unregister
w32tm /register
net start w32time
w32tm /resync
 

==============================================
For DMZ workgroup computers or Virtual Host machines get time from Internet:
w32tm /config /manualpeerlist:au.pool.ntp.org /syncfromflags:manual /update 
==========================================================
How can I check what time source is being used by Windows inside of a virtual machine?

Administrative command prompt > w32tm /query /source.
If you are using the Hyper-V time synchronization integration service you should see the following output:




If you see this output:




It means that there is no time synchronization going on for this virtual machine.  This is a very bad thing – as time will drift inside of the virtual machine.
==========================================================
In windows 7:

w32tm /query /status
==========================================================
Google NTP:
time.google.com
time1.google.com
time2.google.com
time3.google.com
time4.google.com

Cloudflare NTP:
time.cloudflare.com

Facebook NTP:
time.facebook.com
time1.facebook.com
time2.facebook.com
time3.facebook.com
time4.facebook.com
time5.facebook.com

Microsoft NTP server:
time.windows.com

Apple NTP server:
time.apple.com
time1.apple.com
time2.apple.com
time3.apple.com
time4.apple.com
time5.apple.com
time6.apple.com
time7.apple.com
time.euro.apple.com

NTP Pool:
pool.ntp.org
0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
3.pool.ntp.org
asia.pool.ntp.org
0.asia.pool.ntp.org
1.asia.pool.ntp.org
2.asia.pool.ntp.org
3.asia.pool.ntp.org