If you lost or forgot where you had stored your Windows product key, here is a solution for you. Today we will see how to retrieve the product key in an installed copy of Windows 10, Windows 8 or Windows 7 with a single command. It is a simple solution to extract your product key from the OS installed on your PC without using any third party software. Here we go.
Retrieve the product key in Windows 10, Windows 8 and Windows 7
You need to open a new command prompt instance and run the command as described below.
- Open a new command prompt window.
- Type the following command:
wmic path softwarelicensingservice get OA3xOriginalProductKey
It will immediately show you the product key.
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
all keys or just retail
I have not tried it in editions other than retail.
It shows only the embeded key in BIOS/UEFI, not Retail key, not VL key, not upgrade key, etc. With that command you will see only the key of the preinstalled Windows version (from factory), so it’ll work only for Windows 8 and above.
I’ve found few other tools as simple and easy to use as ShowkeyPlus (Magic JellyBean is good but it sets off most AV programs).This program comes from Sven Walter, aka Superfly, a long-time active member of the TеnFоrums.соmmunitу. The ultimate source is from his development area at Github: https://github.com/Superfly-Inc/ShowKeyPlus/releases.
HTH,
–Ed–
This is a fake “open source” app.
I prefer to avoid such apps which are hosted on github and pretend to be opened for everyone, but the source code is hosted somewhere else.
I see no reason to use a third party tool for such a simple task to retrieve the data which can be obtained with a single command.
You are correct
Thanks Ed for the link, never mind the naysayers. The tool worked great for me, since the command line solution kept giving me “invalid query” errors. What is more, it is hard to navigate around when you’re using Windows in another language like me, so the English tool was a big help.
Command doesn’t work for me on Win10 Home upgraded from Win7 on this Acer laptop. All I get as output is “OA3xOriginalProductKey” on one line and a couple of empty lines after that. ShowKeyPlus meanwhile shows me the (generic) Win10 key as well as the embedded Win7 one. Awesome utility.
It not showing the key…
In my case, it does not show any key…
I have a Digital Entitlement…Do you have any idea regarding this???
Unfortunatelly Command Doesn’t work error: Invalid Query
Same here, it just replies with Invalid Query
Either this or the vbs one fails when the product key is cleared from the registry (in my case is because I used slmgr.vbs -cpky).
Does not work for me either. My system is Windows 10 Pro upgraded from Windows 7 Pro.
All I get is this:
c:\>wmic path softwarelicensingservice get OA3xOriginalProductKey
OA3xOriginalProductKey
c:\>
I received the same thing but the vbs worked great!
There is something wrong here. The command above doesn’t show the key used to install, upgrade, or activate Windows. It shows the embeded key in UEFI/BIOS only for a PC or laptop with a factory-preinstalled Windows 8/8.1/10, otherwise it shows an empty line or an error message.
You can even perform a clean installation of Windows with another version or edition, and use a thousand of activation keys, and the command above will always show the embeded key in BIOS.
Does not work for Win 10×64 Retail…
Hi,
This commands only worked for me on Windows 10 pro. It did not work on Windows 7 Home Premiem. Either just work Pro version or just Windows 10
The property “OA3xOriginalProductKey” does not exist in wmic version for Win 7:
C:\>wmic path softwarelicensingservice get /?
Property get operations.
USAGE:
GET [] []
NOTE: ::= | ,
The following properties are available:
Property Type Operation
======== ==== =========
ClientMachineID string Read
DiscoveredKeyManagementServiceMachineName string Read
DiscoveredKeyManagementServiceMachinePort uint32 Read
IsKeyManagementServiceMachine uint32 Read
KeyManagementServiceActivationDisabled boolean Read
KeyManagementServiceCurrentCount uint32 Read
KeyManagementServiceDnsPublishing boolean Read
KeyManagementServiceFailedRequests uint32 Read
KeyManagementServiceHostCaching boolean Read
KeyManagementServiceLicensedRequests uint32 Read
KeyManagementServiceListeningPort uint32 Read
KeyManagementServiceLowPriority boolean Read
KeyManagementServiceMachine string Read
KeyManagementServiceNonGenuineGraceRequests uint32 Read
KeyManagementServiceNotificationRequests uint32 Read
KeyManagementServiceOOBGraceRequests uint32 Read
KeyManagementServiceOOTGraceRequests uint32 Read
KeyManagementServicePort uint32 Read
KeyManagementServiceProductKeyID string Read
KeyManagementServiceTotalRequests uint32 Read
KeyManagementServiceUnlicensedRequests uint32 Read
PolicyCacheRefreshRequired uint32 Read
RemainingWindowsReArmCount uint32 Read
RequiredClientCount uint32 Read
TokenActivationAdditionalInfo string Read
TokenActivationCertificateThumbprint string Read
TokenActivationGrantNumber uint32 Read
TokenActivationILID string Read
TokenActivationILVID uint32 Read
VLActivationInterval uint32 Read
VLRenewalInterval uint32 Read
Version string Read
The following GET switches are available:
/VALUE – Return value.
/ALL(default) – Return the data and metadata for the attribute.
/TRANSLATE: – Translate output via values from .
/EVERY: [/REPEAT:] – Returns value every (X interval) seconds, If /REPEAT sp
/FORMAT: – Keyword/XSL filename to process the XML results.
….