Wednesday, 16 January 2019

One-Liner's for AD Time Synchronisation Information

After finding that some of my domain controller VMs were set to sync with the host, I had a time synchronisation issue across my domiain. Here are a couple of commands that assisted in resolving the problem.

Show all Domain Controller times with 1 sample


(Get-ADForest).GlobalCatalogs | sort | % { Write-Host "$($_): " -foregroundcolor Yellow -nonewline ; w32tm /stripchart /computer:$_ /dataonly /samples:1 | Select -Last 1}



The first column is the DC name, 2nd is local time (machine you're running the command from) and the 3rd is the DC's offset from local time

Force Sync on all DCs


(Get-ADForest).GlobalCatalogs | % { w32tm /resync /computer:$_ /nowait}


Slightly more full featured script:


Vulnhub Writeup: Silky CTF 0x02

Vulnhub Writeup - Silky CTF 0x02 This is the first box on the OSWE track from TJNull’s infamous list You can download the box from Vulnhub...