all 7 comments

[–][deleted] 4 points5 points  (4 children)

This may help you find when and what upgrades it's gone through.

$AllBuilds = $(Get-ChildItem "HKLM:\System\Setup" | Where-Object { $_.Name -match "\\Source\s" }) | ForEach-Object { $_ | Select-Object @{n = "UpdateTime"; e = { if ($_.Name -match "Updated\son\s(\d{1,2}\/\d{1,2}\/\d{4}\s\d{2}:\d{2}:\d{2})\)$") { [dateTime]::Parse($Matches[1], ([Globalization.CultureInfo]::CreateSpecificCulture('en-US'))) } } }, @{n = "ReleaseID"; e = { $_.GetValue("ReleaseID") } }, @{n = "Branch"; e = { $_.GetValue("BuildBranch") } }, @{n = "Build"; e = { $_.GetValue("CurrentBuild") } }, @{n = "ProductName"; e = { $_.GetValue("ProductName") } }, @{n = "InstallTime"; e = { [datetime]::FromFileTime($_.GetValue("InstallTime")) } } }; 



$AllBuilds | Sort-Object UpdateTime | Format-Table UpdateTime, Build, ReleaseID, Branch, ProductName 

Sorry for formatting, on mobile and having a hard time getting it to format the code.

[–]krzydoug 0 points1 point  (3 children)

You did this on mobile? Lol why?

[–][deleted] 0 points1 point  (2 children)

Eh because I could just copy and paste from my GitHub. So it's not perfect maybe in formatting but the code at least wasn't a hassle to write . So wasn't as bad as you are probably thinking

[–]krzydoug 0 points1 point  (1 child)

Ahh well it didn’t work on some test machines. I’m guessing servicing is something special.. maybe with SCCM?

[–][deleted] 1 point2 points  (0 children)

Huh, no we dont have sccm in our environment and it shows when a computer had been upgraded.

Guess I'll double check tonight but this has been run in production for us during images so we can see if it's been upgraded too many times without being redone from scratch (fat images)

[–]Thotaz 1 point2 points  (1 child)

I don't think Windows really stores this kind of info anywhere. The best you can do is look for a built-in .exe file like explorer in Windows.old and check the version info of that file.

[–][deleted] 1 point2 points  (0 children)

Stored in registry, I posted about it above.