It is to be noted that a Retail product license is tied to the person whereas the OEM product key is tied to the machine, as per Microsoft Windows Desktop licensing terms. In this post, we will see how to find the original Windows Product Key using Command Prompt or PowerShell, from BIOS or Registry. It works for Retail & OEM licenses too.
Recover Windows product key using Command Prompt
From the WinX Menu in Windows 10 / 8.1, open an elevated command prompt window, type the following command and hit Enter:
wmic path softwarelicensingservice get OA3xOriginalProductKey
Your Windows product key will be displayed.
Get Windows License Key using PowerShell
Open a PowerShell windows with administrative privileges, type the following command and hit Enter:
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"
Your Windows licence key will appear! This will work on Windows 10 / 8.1 / 7 / Vista.
In Windows 10, the product key will probably be encrypted, tied to your Microsoft Account and stored by Microsoft in the cloud too.
If this does not work for you, you can also use some free Software Key Finders to recover and save, not just Windows, but even Office, Software, Games serials and license keys.