W32tm WINDOWS TIME SERVICE USEFUL COMMANDS

February 23, 2016

no comments

W32tm WINDOWS TIME SERVICE USEFUL COMMANDS

 

W32tm is powerful command line tool for setup, monitoring and manage time service on Windows systems.

You can find relevant reference on TechNet website

 

Here some useful commands.

 

Note: You may need to launch an elevated Command Prompt (right-click Run as administrator)

 

#1 TIME OFFSET BETWEEN CURRENT COMPUTER TO YOUR DOAMIN

C:\> w32tm /monitor /domain:DOMAIN /nowarn

C:\> w32tm /stripchart /computer: DOMAIN /samples:5 /dataonly

#2 DISPLAY THE CURRENT TIME ZONE SETTINGS

C:\> w32tm /tz

#3 LIST PEERS (EXTERNAL NTP SERVERS)

C:\>w32tm /query /peers

#4 RESTORE WINDOWS TIME SERVICE ON LOCAL COMPUTER TO DEFAULT SETTINGS

Unregister service and remove all configuration information from the registry.

C:\>net stop w32time
C:\>w32tm /unregister
C:\>w32tm /register
C:\>net start w32time

#5 RE-SYNC TIME

Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize.

C:\>w32tm /resync

 #6 REDETECT THE NETWORK CONFIGURATION AND RE-SYNC TIME

force redetection of network resourced before resynchronization.

C:\> w32tm /resync /rediscover

#7 SYNCHRONIZING PDC TIME WITH EXTERNAL SOURCE

C:\> w32tm /config /manualpeerlist:PEERS /syncfromflags:manual /reliable:yes /update
C:\> net stop w32time && net start w32time

 

If you add more than one source to set them in quotation marks:

C:\> w32tm /config /manualpeerlist: "0.ntp.pool.org 1.ntp.pool.org 2.ntp.pool.org"/syncfromflags:manual /reliable:yes /update
C:\> net stop w32time && net start w32time

 

 

To find who is your PDC:

C:\>netdom /query fsmo | find "PDC"

#8 CHANGE THE WINDOWS TIME SERVICE CONFIGURATION ON THE PDC EMULATOR IN THE FOREST ROOT DOMAIN

If you move the PDC emulator role to another domain controller or if you decide to configure a different domain controller as the reliable time source for the forest, you can use this procedure to change the Windows Time service (W32time) configuration on the PDC emulator that is currently configured as the reliable time source for the forest.

 

C:\> w32tm /config /syncfromflags:domhier /reliable:no /update
C:\> net stop w32time && net start w32time

 #9 CONFIGURE A CLIENT COMPUTER FOR AUTOMATIC DOMAIN TIME SYNCHRONIZATION

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

#10 CHECK A SYSTEM’S CURRENT NTP CONFIGURATION

Information:

C:\> w32tm /query /status

 

Configuration:

C:\> w32tm /query /configuration
Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.