Configuring Active Directory Time using the W32TM Utility.

Active Directory domain time in my lab domain has been off by a few minutes of UTC time for a while now. Resetting time across an Active Directory domain is a straight forward process using the W32tm command line tool. My first step was to determine the current AD domain time source on my client:

PS C:\> w32tm /query /source
WS2012R2.domainname.net

Explore the options available with the w32tm tool:

PS C:\> w32tm | more

Time1

Time2

At this time, I am more interested in the /config switch of the w32tm tool and it's available parameters :

w32tm /config [/computer:] [/update]
[/manualpeerlist:] [/syncfromflags:]
[/LocalClockDispersion:]
[/reliable:(YES|NO)]
[/largephaseoffset:]

Configure the Domain Controller 'WS2012R2' as Time Server:

PS C:\Users\admin\> w32tm /config /computer:ws2012r2 /manualpeerlist:time.windows.com /reliable:YES /syncfromflags:Manual /update
The command completed successfully.

Resync the Time on The Server:

[ws2012r2]: PS C:\Users\admin\Documents> w32tm /resync /nowait /rediscover
Sending resync command to local computer
The command completed successfully.

Restart the Time Service:

[ws2012r2]: PS C:\Users\admin\Documents> Restart-Service -Name w32time

Query for the current Time Source:

[ws2012r2]: PS C:\Users\admin\Documents> w32tm /query /source
time.windows.com

Configure the second domain controller (DC01) Time Source as WS2012R2 :

PS C:\> Enter-PSSession -ComputerName dc01
[dc01]: PS C:\Users\admin\Documents> w32tm /query /source
VM IC Time Synchronization Provider
[dc01]: PS C:\Users\admin\Documents> w32tm /config /syncfromflags:domhier /update
The command completed successfully.
[dc01]: PS C:\Users\admin\Documents> Restart-Service -Name w32time
[dc01]: PS C:\Users\admin\Documents> w32tm /resync /nowait /rediscover
Sending resync command to local computer
The command completed successfully.

Disable VM Time Synchronization on the second domain controller (DC01):

Time3

Verify Time Source on DC01 :

[dc01]: PS C:\Users\admin\Documents> w32tm /query /source
WS2012R2.domainname.net

The result of the query shows DC01 time source as WS2012R2 domain controller. The domain time on the client machines also automatically reset to the new time.

Advertisement
This entry was posted in Active Directory, Active Directory Domain Services, Active Directory Time, AD Forest, Domain Controller, PowerShell and tagged , . Bookmark the permalink.

1 Response to Configuring Active Directory Time using the W32TM Utility.

  1. Pingback: Configuring Date and Time on a Cisco 3750G Layer 3 Switch. | chinny chukwudozie,it pro

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 )

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