It is easy to solve the problem with MS Windows OS to read / display license key via command line!If you want to reinstall your Windows 10 or 11, it is possible that at some point you will not be able to proceed due to the Windows product key that you have lost. With a few simple methods, such as PowerShell, command prompt and / or Windows registry, you can easily find out and store the Windows 11, 10, 8.1, ... as well as MS-Server 2022, 2019, 2016, ... the product key.
Contents: 1.) ... How to find out the Windows license key with PowerShell!
|
(Image-1) Read out the Windows 10, 8.1, 7 license key via the command line! |
![]() |
Info:
When you buy a new PC, it is pre-activated. You may not need to open your command prompt or play with the Windows registry. Your Windows key might be right in front of you on a Certificate of Authority (COA) sticker on your computer or in the original packaging. If you bought your PC from an authorized Microsoft reseller, you will need to find the Windows product key on a label inside the PC box.

2.) The Windows product key using the command prompt!
1. Start the command prompt as administrator
2. Now enter the following command in the command prompt and press Enter:
wmic path softwarelicensingservice get OA3xOriginalProductKey
2. Now enter the following command in the command prompt and press Enter:
wmic path softwarelicensingservice get OA3xOriginalProductKey
(Image-2) Read out the Windows product key via the cmd.exe command line! |
![]() |
This method of recovering Windows Product Key using CMD is very simple. All you need to do is open a command prompt window with administrator rights. To do this, search for cmd in the Windows search bar and right click to select the elevated permissions option.

3.) Is it illegal to read the product key using the command prompt?
In many cases, it is legal to use the product key for a software or operating system if you purchased it legally and the license terms are followed. In some cases, reading the key may be necessary to reinstall the product or activate it on another device.However, illegal activities such as reading product keys and using them for unlicensed or stolen software can be illegal. Reading and using product keys without the required license or permission may result in legal consequences, including fines and legal action from rights holders.
It is important to check local laws and the license terms of the software or operating system to ensure you are in compliance with the law. If in doubt, you should contact the manufacturer or a lawyer for legal clarity.
Here are some examples of situations in which reading a product key may be legal:
You legally purchased the software or operating system and complied with the license terms.
You must read the product key to reinstall or activate the software or operating system on another device.
For support or repair services you will need the product key.
Here are some examples of situations where reading a product key may be illegal:
You use the product key for unlicensed or stolen software.
You sell or give away the product key to third parties.
You are using the product key for purposes other than those for which it was originally intended.
If you are unsure whether reading a product key is legal in your situation, you should contact an attorney.
FAQ 73: Updated on: 22 October 2023 20:38