This post shows how to find Windows 11/10 Product Key using Command Prompt or PowerShell, from BIOS, UEFI or Registry. It works for Retail, OEM, etc, licenses. 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.
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, for 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.
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 firmware-embeded Windows Product Key using Command Prompt or PowerShell, from BIOS or Registry. It works for Retail & OEM licenses too.
How to find Windows 11/10 Product Key using Command Prompt
From the WinX Menu in Windows 11/10, 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 11/10 License Key using PowerShell
To find your Windows 10 Product Key, open a PowerShell window with administrative privileges, type the following command and hit Enter:
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"
Your Windows license key will appear! This will work on Windows 11/10/8/7/Vista.
Running this will allow you to retrieve more information about the Windows product license:
Get-CimInstance -query 'select * from SoftwareLicensingService'
In Windows 11/10, the product key will probably be encrypted, tied to your Microsoft Account and stored by Microsoft in the cloud too.
You can also find Windows product key using VB Script.
If you are looking for an easier way, 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.
This post will help you if you want to uninstall the Windows Product Key.
Related:
I can’t get either one of those commands to work, but other finders do find my key.
How to find Windows Product Key using Command Prompt or PowerShell on Windows 7??
commands are not getting output when i tested (i am testing in computers in a AD domain )
I have used this before, and it works perfectly.
copy and paste
copy and paste
Open a PowerShell windows with administrative privileges, type the following command and hit Enter:
powershell “(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
working on 8.1 to
Wow, it found my OEM product key for Windows 8.1! I am so pleased because I have tried everything to find it. Many thanks for this tip.
A lot easier to download the Bel-Arc Advisor,it gives you anything you want to know about your system,and i mean everything.
True. There are many such tools that can help you: https://www.thewindowsclub.com/recover-save-windows-office-software-games-serials-keys
Fantastic program. Many thanks, Hap !!
No JOY here, likewise.
I copied and pasted in the command prompt and powershell in windows 8.1 pro and I get no results as Dennis Thompson stated.
wmic path softwarelicensingservice get OA3xOriginalProductKey
is working works for me to
I want to show you mine I can t
just use a finder like produkey, saves you the hassle.
I have a Win7 64-bit machine. When I try this command in a command prompt window as admin I get an invalid query error.
Personally, I use Belarc Advisor to obtain my Windows and Office license keys. The only problem is that since Office 2013, the Office license key is nowhere to be found. Can anyone provide a way to retrieve Office 2013 and newer license keys?
that one many software programs like that
Does anyone think the Republicans will ever again find a product key for the white house ,that would be called the Presidency ?
I have Windows 7 Ultimate and I simply cannot have this command (wmic path softwarelicensingservice get OA3xOriginalProductKey) work!!
I tried several folders using the command prompt and even using Run as an Administrator and nothing works!
C:Windowssystem32
C:
C:usersuser
and more and nothing works!
THANK YOU SO MUCH HOLY JESUS
Its work but the product key is not same.
My last 5 key is M3YM6 (I just making the key up).
When I do the command, the last 5 key isn’t same.
Does the product key in the cmd/power shell is working with the same windows?
i got my product key for windows 10, but when i tried it, it states that “This product key didn’t work. Please check it and try again, or try a different key.”
This worked on my before I used the Reset feature on my Windows 10 and it doesn’t work anymore now; it just puts out a blank line for outpost.
The command retrieves the embedded product key that your laptop/PC came with from the manufacturer. The key it finds is the key for the original Operating System that came with your computer. Whether its Win 8/8.1/10
i have sony vivo laptop with windows 7 pro and its sticker. then i changed it with c racked version of windows8 now it want to turn on to aactivated version of windows7 pro. please tell me how t do this
Bel-Arc reports different keys than the command line. Can’t trust any of the methods I have tried so far. How do you know which is the real one?
So, if you upgraded from Windows 7 Home to Pro and then upgraded to Windows 10 Pro, the key that is reported by the command line is not the current license, correct? How do you find the current license? Bel-Arc?
For current product key, either use Belarc like you mentioned or Magjcal Jellybean which is what I use. If you’re still having issues with activating Windows. You can call Microsoft support and they should be able to help depending on the situation.
Thanks…
Thank you so much
The commands above give me an empty output, and of the product key finders only two gives me the same key – namely License Crawler, and Magical Jelly Bean. The rest of them gives me “other” Windows 10 product keys – if any at all.
IT does not work with 64-bit Windows 7 Professional OEM HP laptop. No error, there is simply no output. A new command line appears and nothing more.
This VBS script works (save text as a .vbs file):
Set WshShell = CreateObject(“WScript.Shell”)
MsgBox ConvertToKey(WshShell.RegRead(“HKLMSOFTWAREMicrosoftWindows NTCurrentVersionDigitalProductId”))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = “BCDFGHJKMPQRTVWXY2346789”
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 – i) Mod 6) = 0) And (i -1) Then
i = i -1
KeyOutput = “-” & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function
I’m getting the encrypted code. How am I supposed to decrypt the code?
*People who wanna upgrade windows can go to “yskeys . com” to get help, 100% working.*
I would like to share with you my experience, I went to seach.vanskeys to buy a key, to my surprise, their attitude is very good, but the key work is normal, there is very little money I spent, very happy the first purchase and recommend it to you.
How can I retrieve my windows 8.1 key from a non bootable windows 8.1. I lost my CD Key and windows got corrupted and when I reset it, it starts loading and halts with a blank screen and stops there. I tried this command from DOS by going from window installation disk, repair windows, advanced command prompt, but its giving me an error. Description = Not Found. Can anyone help to retrieve this product key.
doesn’t work. all those values are empty:
OA3xOriginalProductKey :
OA3xOriginalProductKeyDescription :
OA3xOriginalProductKeyPkPn :
It shows
Node –
ERROR
Discription – Invalid query
I found my product key but it turned out i don’t need it because i upgraded to Windows 10 when I was signed in with my Microsoft account,so as soon as i signed in it activated without an issue
the command works, but there is no key it shows just an empty value and go back to command line, i had to use regedit instead.
Entrar en regedit
EquipoHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionSoftwareProtectionPlatform
Use this site and download. I have tried others and it matches the result with this one so this is authentic. https://www.nirsoft.net/utils/product_cd_key_viewer.html
But when I called Microsoft, they said that the product key is not valid which is link to my Microsoft account after it has been activated or downloaded for free. I think there’s a product key embedded in the downloaded free upgrade of windows 10 for it to work. You can give it a try. I think I have spoken to a less experienced agent who doesn’t know what she is doing nor has lack of knowledge regarding how things would work.
Dude that is awesome. Thanks a ton! You saved me a loooooooot of trouble.
Not working on winodws 7 basic Home :
Thanks, the powershell/cmd are useless but the regedit method worked on a desktop, not on a 2012 server.
I’m from the future. The answer is yes.