Powershell Time Syncronization Script.
Time Sync is a real thin’ issue on domain environment ,
all workstations ,servers,devices and apps sync with Time Setting usually comes from the PDC (Primary Domain Controller)
on some cases you’re finding out there’s a gap between the PDC and 1 workstation ..so the fix is really easy ..
but on some cases you can find out the gap of time sync can be found as real BIG issue like it affecting the entire network devices (!PLEH)
so ..what can we do about it ?
we can use a A tool used to diagnose problems occurring with Windows Time
W32tm Note: no need to download it ,its built in the system. 🙂
# PS Script :
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Import-Module ActiveDirectory $list = Get-ADComputer -LDAPFilter '(objectClass=Computer)' | Select -Expand Name foreach ($computer in $list) { Write-Host "working on $computer" Invoke-Command -ComputerName $computer -ScriptBlock { w32tm /resync } } |
(Visited 3,768 times, 1 visits today)