Incorrect time on a Windows device or server can prevent security updates or user authentication, and it can interfere with a forensics investigation. Credit: Thinkstock The recent U.S. daylight saving time change reminded me of a key element in security and computing: time. Setting computers to the proper time is key to authentication and to keeping systems updated and secure. When you are dealing with forensics, you need to know the exact time to which each device is set to correlate events in a timeline.In the native operating of Windows, it’s important to have a system synchronize your device’s time with either a domain controller set to the proper time or to an external time source. Computers use time to determine if SSL certificates are valid and can be trusted and to check with the Windows update servers to determine if the digital signature of the patch is valid.If you’ve ever turned a computer on and the CMOS battery no longer keeps it in proper time, you know the machine won’t get online, react to websites or install updates. Once you reset the time, the machine suddenly works properly. You will not be able to log into domain-joined machines that rely on Kerberos authentication that are out of sync by more than five minutes. Keeping time accurate is also mandated for credit card (PCI) transactions, as well as other financial transactions.How to sync time in Windows environmentsI’ve relied on a series of commands to ensure that my primary domain controller keeps in synchronization. The sample below uses pool.ntp.org, a volunteer group that maintains time-keeping servers, but you can also use nist.gov time servers to be your primary time keeper. w32tm /config /syncfromflags:manual "/manualpeerlist:0.pool.ntp.org,0x1 1.pool.ntp.org,0x1 2.pool.ntp.org,0x1 3.pool.ntp.org,0x1" /reliable:yesw32tm /config /update net stop w32time && net start w32timew32tm /resync /forcew32tm /query /sourceIf you enter the above in an elevated command prompt, then enter the commands below on each other domain controller, also in an elevated command prompt:w32tm /config /syncfromflags:domhier /reliable:no /updatenet stop w32time && net start w32time w32tm /resync /forcew32tm /query /sourceYou can set the skew time in Group Policy, but it’s wise to not let machines skew too much in time from each other. For Server 2019, use PowerShell to perform the synchronization:w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL Stop-Service w32timeStart-Service w32time Susan BradleyPowerShell command to sync timeIf you rely on Azure Stack, time is important there as well. In Azure stack, use the command Get-AzSTimeSource to determine the time information.For those with mixtures of Server 2016 and later that participate in domains that include Server 2012 R2 and earlier, pay close attention to disabling HyperV time provider as an option in mixed networks. Server 2016 and later will attempt to sync their time from the most accurate provider rather than syncing with the host it’s connected to. Because that may not be ideal, you can override that behavior. Related content news Google Chrome zero-day jumps onto CISA's known vulnerability list A serious security flaw in Google Chrome, which was discovered under active exploitation in the wild, is a new addition to the Cybersecurity and Infrastructure Agency’s Known Exploited vulnerabilities catalog. By Jon Gold Oct 03, 2023 3 mins Zero-day vulnerability brandpost The advantages and risks of large language models in the cloud Understanding the pros and cons of LLMs in the cloud is a step closer to optimized efficiency—but be mindful of security concerns along the way. By Daniel Prizmant, Senior Principal Researcher at Palo Alto Networks Oct 03, 2023 5 mins Cloud Security news Arm patches bugs in Mali GPUs that affect Android phones and Chromebooks The vulnerability with active exploitations allows local non-privileged users to access freed-up memory for staging new attacks. By Shweta Sharma Oct 03, 2023 3 mins Android Security Vulnerabilities news UK businesses face tightening cybersecurity budgets as incidents spike More than a quarter of UK organisations think their cybersecurity budget is inadequate to protect them from growing threats. By Michael Hill Oct 03, 2023 3 mins CSO and CISO Risk Management Podcasts Videos Resources Events SUBSCRIBE TO OUR NEWSLETTER From our editors straight to your inbox Get started by entering your email address below. Please enter a valid email address Subscribe