Guide | How to Find Your Windows Product Key

Back in the old days of optical discs, Windows XP, and the beige PC cases, it’s just easy to retrieve or  re-use your Windows Product Key. You just have to either look at your Windows CD/DVD or at the Certificate of Authenticity Sticker located on your PC’s case or notebook. Fast forward today, Microsoft isn’t all that generous to add your Windows Product key anymore on any stickers, especially if we’re talking about OEMs or simply manufacturers who bundled any recently released Windows OS for you to freely use. Surely, back in the days, it’s easier said and easier done.

There are many reasons why you wanted to see your Windows Product Key. Maybe you lost it and just wants to freshly format your PC then get rid of the viruses or troubles for good. Maybe you are transferring to a newly built Gaming PC, but you love your OS anyway and has no spare penny to buy a new one, or simply you just want to see what’s rightfully yours. Either way, as many reason there is, there are many ways to reveal the Windows Product Key yourself and we’re going to check easy methods to reveal them. Most of these methods have been tested with Windows 7 and they do work.

Note: One must know that your Product Key might be located on your notebook or PC’s UEFI / BIOS firmware. Thus, it might be displayed differently to your Product ID. Your Product ID isn’t exactly your Product Key by the way, and finding the Product Key is the best as it is what you will need in an event of re-installation.

Command Prompt Method: Windows 7, 8.1 and Windows 10

Probably the easiest, the Command Prompt method should be the first thing to do to check your key. To do so, open up the CMD via any means, or just press “Windows Key + R” and type “CMD”. Once inside, just input the code below:

Windows Product Key (6)

wmic os get "SerialNumber"

To paste the code to CMD, just copy the text above and click the right mouse button on the CMD’s UI, then click paste. Just press the Enter / Return Key afterwards to see the result.

Windows Product Key (5)

Windows Key Retrieval Via PowerShell: Windows 8, 8.1 and Windows 10

As the name suggests, The Windows PowerShell is actually a very, very powerful tool at anyone’s disposal – which is a task automation management framework that could be used to “do” administrative tasks generally performed via cmdlets. In layman’s term, it’s the IT Administrator’s weapon of choice to automate tasks in a command line fashion, similar to CMD but is way more powerful. We have included Two sub methods for “this” method of showing the product key, as Windows 7’s method differs from the latest versions of Windows and is a bit more tricky albeit it should be easy enough if you have the aptitude.


For Windows 8, 8.1 & 10, Tis’ a fairly easy matter to do. Just open up Window’s PowerShell as an administrator, via the search bar on your Windows OS > right-click its icon, and press “Run As Administrator” or equivalent.

On the PowerShell’s UI, copy the command below, or paste it via copying the command, and then right clicking anywhere on the PowerShell UI.

powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

After that, press the Enter/Return key to check out your Product Key. It shouldn’t be hard.

Windows Key Retrieval Via PowerShell: Windows 7 Only

For Windows 7, things are going to be a bit trickier albeit still easy enough for anyone to do if you prefer the PowerShell way. First, you need to copy the query below:

function Get-WindowsKey {
## function to retrieve the Windows Product Key from any PC
## by Jakob Bindslet ([email protected])
param ($targets = ".")
$hklm = 2147483650
$regPath = "Software\Microsoft\Windows NT\CurrentVersion"
$regValue = "DigitalProductId"
Foreach ($target in $targets) {
$productKey = $null
$win32os = $null
$wmi = [WMIClass]"\\$target\root\default:stdRegProv"
$data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)
$binArray = ($data.uValue)[52..66]
$charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"
## decrypt base24 encoded binary data
For ($i = 24; $i -ge 0; $i--) {
$k = 0
For ($j = 14; $j -ge 0; $j--) {
$k = $k * 256 -bxor $binArray[$j]
$binArray[$j] = [math]::truncate($k / 24)
$k = $k % 24
$productKey = $charsArray[$k] + $productKey
If (($i % 5 -eq 0) -and ($i -ne 0)) {
$productKey = "-" + $productKey
$win32os = Get-WmiObject Win32_OperatingSystem -computer $target
$obj = New-Object Object
$obj | Add-Member Noteproperty Computer -value $target
$obj | Add-Member Noteproperty Caption -value $win32os.Caption
$obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion
$obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
$obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber
$obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser
$obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber
$obj | Add-Member Noteproperty ProductKey -value $productkey

After copying, open notepad > paste the query > and then save it as a .ps1 extension file. Let’s say save it as “Windows7Key.ps1” at the desktop. After that, run the PowerShell console as an administrator, then input the following command:

Set-ExecutionPolicy RemoteSigned

After pressing Enter / Return, and confirming by pressing “Y” (Yes) to commence, issue the command below. Note that you should change “USERNAME” to your username and the “Windows7Key.ps1” to the name of .ps1 file of your liking.

Windows Product Key (2)

Import-Module C:\Users\USERNAME\Desktop\Windows7Key.ps1; Get-WindowsKey

And now we have our Windows Product Key displayed. Very nice.

Windows Product Key (1)

Download a Third Party Software:

Now if you don’t feel doing those things, there’s always a software to back you up. The Magical Jelly Bean is an easy to use key finder to check out your Windows OS’ product key, and it could also retrieve 300 more keys from other popular programs too. I use this sparingly, whenever I need to reformat for science purposes. Just follow the instructions from the link and the installation procedures to get started. Just make sure to un-check the “Razor Web” extension add-on so you wont install it accidentally. It sucks, and is a potential adware.

Windows Product Key (3)

So there you have it. Easy right? Just remember that Microsoft started on their licensing terms that the OEM key and Retail key differs. Both might be the same, but the terms of usage differs even though you’ve found your key. For example, the OEM based key provided is intended to be used on the PC or notebook you received your copy of Windows with so legally, you can’t use it on other PCs. For the retail version, it’s all up to you.

Recent Articles

The Best Data Recovery Software to Recover Your Data

Recovering data from PC or smartphone after an invasion by malicious software comes with its share of challenges. Trying to rediscover videos, photos, documents,...

Audition Holds PH Qualifier for IESF World Championship Tournament

A big milestone for Audition Next Level and its fans was revealed end of August 2020 as the International Esports Federation (IeSF) announced that...

CORSAIR Launches CX-F RGB Series PSU

CORSAIR®, a world leader in high-performance gaming peripherals and enthusiast components, today announced the launch of its first line of individually addressable RGB-lit power...

GEIL Announces ORION Phantom Memory with ASRock

GeIL, Golden Emperor International Ltd. – one of the world's leading PC components & manufacturers today is proud to announce the partnership with the...

AOC is Philippines’ #1 PC Monitor brand According to IDC

AOC continues to be the most sought-after PC Monitor brand in the Philippines. According to the International Data Corporation (IDC), the world’s premiere global...
ASRock Z490
Colorful Graphics


  1. PS script doesnt give the right KEY (i know my original key + jelly bin shows the right key), guess there is a problem with the decode

  2. When you use a Windows 7 product key for 32 bit/64 bit, you are on your own. There is no official Microsoft support for Windows 7.

  3. I just cant tell you how thankful I am for the wmic os get “SerialNumber” cmd it was a saver this never popped in my head, I’ve been doing the wmic path SoftwareLicensingService get OA3xOriginalProductKey, finally a sys restore w/o a headache.. :)

  4. Thank you so much. Running win 7 virtual guest in VirtualBox on Mac x is a little buggy. Running cmd.exe isn’t always reliable. I completely forgot about PowerShell. Ran like a charm. :)

Leave A Reply

Please enter your comment!
Please enter your name here

Leo Bien Durana is the Owner and Chief Editor of TechPorn. A competitive PC gamer with a robust technical background. He usually breaks a lot of stuff though.