How to find Windows Product Key using Command Prompt or PowerShell

When you enter, register and activate your copy of Windows, using a Retail key, the information is stored in the Windows Registry. Users of OEM computers may have noticed that, since a couple of years, the manufacturers have stopped pasting their COA or Certificate of Authenticity sticker, which displayed the Windows product key to the machine anymore. Now this key is embedded in the BIOS/UEFI.

Find Windows Product Key

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

oem-key-windows

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"

find windows product key

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.

Also see how you can find Windows 10 product key using VB Script.

This post will help you if you want to uninstall the Windows Product Key.

Posted by on , in Category Windows with Tags

Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.