Did you buy a computer with Windows 10 preinstalled and don't know the product key? Microsoft used to write the Windows key on a sticker on the bottom of the laptop or on the back of desktops, but abandoned the practice after Windows 7.
The product key, if an OEM key, is automatically detected when you install Windows 10. If you want the key to more security now usually a third party application like ProduKey might find it for you.
Below we will see how to find the Windows 10 product key from the command line.
As mentioned above, if your computer is running, you can find the Windows key with the Nirsoft application ProduKey. Save it to a text file.
Scenario (Destruction): If you do not have the key and perform a new installation of Windows 10, normally the installer will have to find it. However, if you do not discover the key and can not start your computer, you can find the Windows 10 OEM product key from the command line.
To open the command line if you have not installed Windows 10, connect to the DVD / USB installation and use the repair / troubleshooting options and you will find the command line.
Once you have opened the command line, run the following command. It will show you the product key. Write it and continue with Windows 10 installation. When prompted, add the key and the installation will proceed normally.
wmic path softwarelicensingservice get OA3xOriginalProductKey
After installing, you should connect your OEM key to your Microsoft account. It's a much easier way to turn on Windows 10 after a clean installation. After connecting the key to your account, you will be able to enable Windows 10 by doing a connection to Microsoft.
With regard to retail keys: you can not use the above command to retrieve them. Yes the command only works for OEM.