/build/static/layout/Breadcrumb_cap_w.png

Using Command Line to Find & Resolve Time-Sensitive Problems

Video Transcript

Hi, this is Jeff Hicks. Today I want to demonstrate how you can use a few simple command line tools to identify potential time related problems and resolve them. On my Windows 7 Desktop that belongs to a domain I am going to open a command prompt. I am going to first run the nltest command to identify the time server on the domain controller that offers the time service in my domain. I am going to type nltest, the test that I want to run is /dsgetdc:, now I have to specify the domain so I am just going to use the environmental variable %userdomain%, and I want to get the /timeserv.

(nltest /dsgetdc:%userdomain% /timeserv)

I can see that it is \\CHI-DC01 so I am going to run the net time command specifying the domain controller \\chi-dc01 and see what the time for that server compared to my current time. I can see that the current time on the domain controller and I can see my local time. I see something that does not look right there. Looks like there is the local time the GMT-05:00, I have a time zone problem. I can confirm this by using the tzutil command line tool, I am going to type tzutil /? To see how to use this. Okay, so do tzutil /g will display the current time zone and I can see sure enough that I am using Pacific Standard Time which is incorrect. This computer should be in the Eastern Standard Time and that is probably why I am getting that weird result when I run the net time command.

I can use tzutil /l I am going to pipe that to more because it will scroll very quickly off the screen and I can see all the different time zone settings that I can set. Well I want to set the current time zone. I am going to do tzutil /s and specify 'Eastern Standard time'. Now I can run bring back that tzutil /g, good. I can see that I am back to Eastern Standard Time. Let's hit the up arrow a few more times get the net time command again. Alright, now I can see the current time is 4:11:09 PM, the command completed successfully. I do not get that weird little time zone off-set.

Now I know that my desktop is in sync, clock-wise, with the domain controller so I should not have any problems. Using these command line tools I very easily identified a potential problem and fixed it. Take some time to find the accompanying article and blog entry. There is more information on working with time related information in Windows using command line tools and Windows PowerShell. Thank you very much for your time today.


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ