Finding Your Product Key Through Command Prompt

You can retrieve your Windows 10 product key directly from your computer using Command Prompt and a built-in Windows tool called WMI (Windows Management Instrumentation). The command pulls the key from your system's registry, where Windows stores it after set up. This method works whether you installed Windows yourself or it came pre-installed on your device.

The process takes about two minutes and requires you to open Command Prompt as an administrator, paste one line of code, and read the result. You do not need any third-party software or paid tools — everything you need is already on your machine.

Key Takeaways

  • Open Command Prompt as administrator by right-clicking the Start menu, selecting Windows Terminal (Admin) or Command Prompt (Admin), and confirming the permission prompt.
  • Paste the command wmic path softwarelicensingservice get OA3xOriginalProductKey and press Enter to display your product key on the screen.
  • If the command returns nothing, your key may not be stored in the registry — this happens with some OEM installations or if Windows was never activated.
  • Write down or screenshot your product key when ready, because it will not display again unless you run the command a second time.
  • A product key retrieved this way is tied to your hardware; using it on a different computer may trigger a reactivation prompt from Microsoft.

Step-by-Step: Running the Command

Start by opening Command Prompt with administrator rights. On Windows 10, right-click the Start button in the bottom left corner. A menu will appear. Click Windows Terminal (Admin) if you see it, or Command Prompt (Admin) if you do not. A dialog box will ask "Do you want to allow this app to make changes to your device?" Click Yes.

Once Command Prompt is open, you will see a black window with a blinking cursor. Copy this entire line: wmic path softwarelicensingservice get OA3xOriginalProductKey. Right-click inside the Command Prompt window and select Paste, or use Ctrl+V. Press Enter.

Within a second or two, your product key will appear on the next line. It will look like a string of letters and numbers separated by hyphens, such as XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. Write this down or take a screenshot before closing the window. Do not share this key with anyone — it is unique to your installation.

When the Command Returns Nothing

If you run the command and see a blank line with no product key, it means Windows cannot find the key in your system registry. This happens most often with computers that came with Windows pre-installed by the manufacturer (called OEM installations). In these cases, the key is often embedded in your motherboard's firmware rather than stored as text in the registry.

You have two other options. First, check your computer's documentation or the sticker on the back or bottom of your device — many manufacturers print the product key there. Second, if you need to reinstall Windows, you can often reactivate using your Microsoft account instead of entering a key manually. Windows will recognize your device and set up automatically.

Understanding What This Key Is and Is Not

The product key you retrieve is the one tied to your current Windows 10 installation. If you bought Windows separately and installed it yourself, this is the key you paid for. If Windows came with your computer, this is the OEM key assigned to that machine.

This key is not transferable in the way you might think. Microsoft's licensing terms allow you to move a key to a new device only if you are no longer using it on the old one, and even then, reactivation may require contacting Microsoft. If you try to use this key on a different computer, Windows will likely ask you to reactivate, and Microsoft may deny the request if the key is already in use elsewhere.

Alternative Methods if Command Prompt Does Not Work

If you are uncomfortable using Command Prompt or the command does not return a result, you can check your product key through your Microsoft account. Sign in to account.microsoft.com, go to Devices, and select your Windows 10 computer. If Windows is activated under your account, the page will show your device status. This does not display the key itself, but it confirms that your installation is legitimate and linked to your account.

You can also use the Settings app to verify set up status without retrieving the key. Open Settings, go to System, then About. Scroll down to find Windows set up. If it says "Windows is activated," your installation is valid. If it says "set up Windows," your system is not yet activated and you may need to enter a key or link your Microsoft account.

What to Do With Your Product Key Once You Have It

Store your product key in a safe place. Write it down on paper and keep it with your computer's documentation, or save it in a password manager like Bitwarden or 1Password. Do not email it to yourself or store it in an unencrypted text file on your computer — if someone gains access to your device, they could use the key to set up Windows on another machine.

You will need this key if you ever have to reinstall Windows on the same computer. During a fresh Windows 10 installation, the setup process will ask for a product key. You can skip this step and enter it later, but having it ready makes the process faster. If you plan to upgrade to Windows 11, you do not need to retrieve this key — Windows 11 will set up using the same hardware-based set up that Windows 10 uses.

Frequently Asked Questions

Can I use this product key on a different computer?

Not without complications. Windows product keys are licensed per device. If you move the key to a new computer, Windows will likely ask you to reactivate, and Microsoft may refuse if the key is already in use on your original machine. If you no longer use the original computer, you may be able to transfer the key, but you will need to contact Microsoft support to deactivate it on the old device first.

What if I see multiple product keys when I run the command?

This can happen if you have upgraded Windows or reinstalled it multiple times. The command shows the most recent key. If you see more than one result, the last one listed is the one currently in use. The others are from previous installations and are no longer active.

Is it safe to run this command?

Yes. The command only reads information from your system — it does not change anything or read anything. It is a standard Windows tool used by IT professionals and support staff. Running it will not harm your computer or your Windows installation.

Do I need to be connected to the internet to find my product key?

No. The product key is stored locally on your computer, so Command Prompt can retrieve it whether you are online or offline. You do not need an internet connection to run this command or see the result.

What if my product key is different from the one on my receipt?

This usually means you are looking at an OEM key (one that came with your computer) rather than a retail key you purchased separately. OEM keys are tied to the original hardware and cannot be transferred. If you have a receipt for a different key, that key may have been used on a different device or installation.