It may sometimes be useful to look at the upgrade history of a PC running Windows. Maybe you would like to know about the first installed version of Windows on the PC, or need to look up the information for troubleshooting or analysis.

The Windows Registry holds the information under the key Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup and the information there may be all you require.

Just check the Source OS key and browse the data stored under each key to find out about previously installed versions and editions of Windows.

Img

Information that is revealed to you when you browse a Source OS key in the Registry includes the operating system's product name, registered owner and installation path, build number, and installation date among others.

You may use PowerShell commands to list core information. It is just another option to display the Windows upgrade history.

Using PowerShell

You need to open a PowerShell prompt to run the commands. Note that you don't need elevated privileges for that:

  • Tap on the Windows-key, type powershell and select the program from the list of results.

With PowerShell open, run the following commands using copy and paste.

Command 1: $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]:arse($Matches[1],([Globalization.CultureInfo]::CreateSpecificCulture('en-US')))}}}, @{n="ReleaseID";e={$_.GetValue("ReleaseID")}},@{n= "Branch";e={$_.GetValue("BuildBranch")}},@{n="Buil d";e={$_.GetValue("CurrentBuild")}},@{n="ProductNa me";e={$_.GetValue("ProductName")}},@{n="InstallTi me";e={[datetime]::FromFileTime($_.GetValue("InstallTime"))}} };

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

PowerShell returns previous Windows versions in a table when you execute the second command. If you run Windows 10, you may get various Windows 10 feature updates builds returned to you.

If the machine was update from a previous version of Windows, you get its product name listed there as well.

The information may be useful. You can find out if the system was upgraded from a previous version of Windows, or which feature updates of Windows 10 were installed on it prior to the one that is installed currently on the device.

You could verify that the PC you bought was not upgrade from a previous version of Windows but clean-installed.