windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  | Find Windows Product Key using CMD or PowerShell

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

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"

find windows product key

Your Windows license 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.

You can also find Windows 10 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.

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.

47 Comments

  1. Dennis Thompson

    I can’t get either one of those commands to work, but other finders do find my key.

  2. Philip

    How to find Windows Product Key using Command Prompt or PowerShell on Windows 7??

  3. Abhijith Pk

    commands are not getting output when i tested (i am testing in computers in a AD domain )

  4. jensenjs

    I have used this before, and it works perfectly.

  5. Alberto Gorin

    copy and paste

  6. Alberto Gorin

    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

  7. Alberto Gorin

    working on 8.1 to

  8. Shereen Southam

    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.

  9. Hap

    A lot easier to download the Bel-Arc Advisor,it gives you anything you want to know about your system,and i mean everything.

  10. Phil

    Fantastic program. Many thanks, Hap !!

  11. Chris Calabria

    No JOY here, likewise.

  12. Robert L. Taylor

    I copied and pasted in the command prompt and powershell in windows 8.1 pro and I get no results as Dennis Thompson stated.

  13. Alberto Gorin

    wmic path softwarelicensingservice get OA3xOriginalProductKey
    is working works for me to

  14. Alberto Gorin

    I want to show you mine I can t

  15. JonnyS

    just use a finder like produkey, saves you the hassle.

  16. John Mitch

    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.

  17. Peter Burek

    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?

  18. Alberto Gorin

    that one many software programs like that

  19. Gerry Mander

    Does anyone think the Republicans will ever again find a product key for the white house ,that would be called the Presidency ?

  20. Tim

    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!

  21. THANK U

    THANK YOU SO MUCH HOLY JESUS

  22. Mason James

    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?

  23. Satyam Mishra

    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.”

  24. Brian Silvi

    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.

  25. 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

  26. Suraj Pratap Singh

    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

  27. Jarhead68

    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?

  28. Jarhead68

    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?

  29. 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.

  30. Jarhead68

    Thanks…

  31. sailendra pavan

    Thank you so much

  32. Valdemar Lemche

    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.

  33. John Szekely

    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

  34. Doubt

    I’m getting the encrypted code. How am I supposed to decrypt the code?

  35. angle

    *People who wanna upgrade windows can go to “yskeys . com” to get help, 100% working.*

  36. suzy

    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.

  37. Ruben Hili

    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.

  38. MrMeztar

    doesn’t work. all those values are empty:
    OA3xOriginalProductKey :
    OA3xOriginalProductKeyDescription :
    OA3xOriginalProductKeyPkPn :

  39. Siddhant Rastogi

    It shows
    Node –
    ERROR
    Discription – Invalid query

  40. danielgartin6993 .

    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

  41. Douglas Federico Camacho

    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

  42. Lilarcor

    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.

  43. Kyle x

    Dude that is awesome. Thanks a ton! You saved me a loooooooot of trouble.

  44. Ganesh Kalidas

    Not working on winodws 7 basic Home :

  45. Alfredo Putamadre

    Thanks, the powershell/cmd are useless but the regedit method worked on a desktop, not on a 2012 server.

  46. Francis Smith

    I’m from the future. The answer is yes.

Leave a Reply

Your email address will not be published. Required fields are marked *


3 + 6 =