Installation of time windows will be saved in Win32_OperatingSystem WMI class. Alternatively it will be available in registry(HKLMSOFTWAREMICROSOFTWINDOWS NTCURRENTVERSIONINSTALLDATE). So, now you need to figure out your own way of querying values from either wmi or from registry. Being a fan of powershell, I want you to help with two line PS code to get the installation date/time.
$osinstalledtime = gwmi win32_operatingSystem
write-host $osinstalledtime.ConvertToDateTime($osinstalledtime.InstallDate)
That’s it. I will give you the details you need.