If you buy a desktop or laptop that has Windows 10 pre-installed, the very first thing you should do when you boot to your desktop is find out what your OEM key is. Microsoft used to put the Windows product key on a sticker at the bottom/back of desktops and laptops but it abandoned the practice after Windows 7. The product key, when it’s an OEM key, should automatically be detected when you clean install Windows 10 however you should still back it up to be safe. You can use an app like ProduKey or you can get your Windows 10 product key from the Command Prompt.
Product key from Command Prompt
If you’re on your desktop, using ProduKey is the best option. It will reliably find your key and display it for you. Save it to a text file and save it off-site.
If you forgot to back up the key and you’re doing a fresh install of Windows 10, the OEM key should be detected. That’s what happens on a good day. If the key isn’t detected and you’re unable to boot to your desktop, you can still get your Windows 10 OEM product key from Command Prompt.
To get to Command Prompt when you do not have Windows 10 installed, connect your installation media and use the repair/troubleshoot options to get to the Command Prompt.
Once you have Command Prompt open, run the following command. It will return the product key. Write it down and resume installing Windows 10. When you’re prompted to enter the key, do so and your installation should go smoothly.
wmic path softwarelicensingservice get OA3xOriginalProductKey
In addition to manually backing up your OEM key, you should also connect it to your Microsoft account. This is a far easier way to activate Windows 10 whenever you do a clean install. Once your key is connected to your account, you only have to sign in with the account and Windows 10 will be activated.
For retail keys, you cannot use the above command to retrieve them. It’s up to you to make sure you don’t lose a retail key but connecting it to your Microsoft Account ought to keep it safe. You can remove a retail key from your Microsoft account later if you need to and use it on a different system.
While you can retrieve an OEM key from the Command Prompt even when Windows 10 isn’t installed, you should nevertheless back it up when you can. You should also run the following command to make sure a retail key you’ve purchased is legit and has properly activated your system.