Manage Learn to apply best practices and optimize your operations.

Script Out Your Win10 Build History Using PowerShell

I just came across a fascinating pair of PowerShell commands. Run in an administrative PowerShell session, they’ll tell you every build your system has had installed on it since the last clean install was performed. That’s why I say you can use these items to script out your Win10 Build History using PowerShell.

These commands come to you through an interestingly circuitous route around the Northern Hemisphere of Planet Earth. I got them from Russian blogger Sergey Tkachenko at He got them from somebody named (whose domain name, at least is in Germany and post was in German). Originally they came from user sizzlr at Reddit (location unknown, but who writes American English like a native speaker).

How to Script Out Your Win10 Build History Using PowerShell

All you need to do is cut and paste the content for each line item below from this blog post into an administrative PowerShell session. Copy Line 1 first, then paste it, then hit enter (only the monospaced text, please). Repeat that same process for Line 2 (ditto).

Line 1:cls

$AllBuilds = $(gci "HKLM:\System\Setup" | ? {$_.Name -match "\\Source\s"}) | % { $_ | Select @{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"))}} };

Line 2:
$AllBuilds | Sort UpdateTime | ft UpdateTime, ReleaseID, Branch, Build, ProductName

Sampling a Win10 Build History

Here’s what the output from my production desktop looks like in PowerShell:

The sequence captures my journey from Win 10 Pro to Enterprise Insider to Enterprise current branch.
[Click image to see full-sized view.]

I’m not sure that anybody really NEEDS this capability. But it is very interesting to look at the sequence of builds that have come and gone on most PCs. My fast ring PCs produce listings with 93(!) entries in that list, starting with Build 10547 on 10/17/2015 and ending with Build 17123 on 3/20/2018 (and that’s because I haven’t rebooted that machine to upgrade it 17128 just released this afternoon). Great stuff!

Here’s that lengthy list in all its glory: