A Windows product key is a 25-character code that looks like XXXXX-XXXXX-XXXXX-XXXXX-XXXXX and is used to activate Windows.
This short note shows how to find the Windows product key from a command prompt (CMD) or from a Windows PowerShell and check its validity.
Cool Tip: How to check Windows version from CMD & PowerShell! Read more →
How To Find Windows Product Key
To find the Windows product key it is required to start the command prompt or the Windows PowerShell as an administrator.
Press ⊞ Win keybutton to open the “Start” menu, type in cmd to search for the command prompt or power to search for the PowerShell and press the Ctrl + Shift + Enter to launch it as an administrator.
Execute the command below in the elevated command prompt or the Windows PowerShell to display the Windows product key:
C:\> wmic path softwareLicensingService get OA3xOriginalProductKey
You can check the validity of the installed Windows product key by running this command from the command prompt or the Windows PowerShell:
C:\> slmgr /dli
If the license status is “Licensed”, then you are using the genuine Windows product key, otherwise the key is not genuine.
It says Licensed but it does not show the product key…
What to do???
That’s normal. Before checking if it’s licensed, you need to do ´wmic path softwareLicensingService get OA3xOriginalProductKey´ to get the product key. Then you can do ´slmgr /dli´ to see if its licensed. The ´slmgr /dli´ will only show the partial key, but the ´wmic path softwareLicensingService get OA3xOriginalProductKey´ shows the entire key.
my cmd doesnt show any key when that is entered