Cain Manor

Your Guide To All Things Cain™

Windows Time Troubleshooting

Win­dows time has two com­po­nents. First is the Domain Con­troller. The Domain Con­troller should be sync’ed to the mas­ter NTP server in the envi­ron­ment. Microsoft’s excel­lent doc­u­ment on the steps nec­es­sary can be found HERE.

The Win­dows clients will need to be con­fig­ured to point to the Domain Con­trollers (DC’s.) If you’ve never installed any non-Microsoft util­i­ties, you should be OK by just mak­ing sure Win­dows Time is run­ning. How­ever, if it is not run­ning, or some­thing has bro­ken time, these are steps that will help you fix your prob­lems.

Let’s check to see if Win­dows Time is running

sc query w32time

You should get a result such as

SERVICE_NAME: w32time
TYPE               : 20  WIN32_SHARE_PROCESS
STATE              : 4  RUNNING (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0

If you don’t, start services.msc and start the ser­vice and set it to Automatic

Now let’s make sure that the server is setup cor­rectly. Check to see if the domain server is our time server. Note the “:” is part of the command.

C:\WINDOWS>nltest /dsgetdc:

Look for the flag “TIMESERV.” This indi­cates that the Domain Con­troller is our Time Server.

DC: \\myDomainController.domain.com
Address: \\10.1.99.19
Dom Guid: 9db0908b-8f45-499f-9c20-49905773f553
Dom Name: domain.com
Forest Name: domain.com
Dc Site Name: Default-First-Site-Name
Our Site Name: Default-First-Site-Name
Flags: PDC DS LDAP KDC TIMESERV GTIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE
The command completed successfully

Check that the client has the cor­rect information

w32tm /dumpreg /subkey:parameters

The only thing to look for is a Type of NT5DS. That’s the pro­to­col we use to speak to the the Domain Con­troller. Any other set­ting is wrong.

Value Name      Value Type          Value Data
-------------------------------------------------
 
ServiceMain     REG_SZ              SvchostEntry_W32Time
ServiceDll      REG_EXPAND_SZ       C:\WINDOWS\system32\w32time.dll
NtpServer       REG_SZ              time.windows.com,0x1
Type            REG_SZ              NT5DS

To sync the server with the domain controller.

w32tm /resync /rediscover

You should now be get­ting in sync. You can see your off­set shrink­ing if you type

w32tm /stripchart /computer:myDomainController /samples:5 /dataonly

Comments are closed.