Windows 10 Product Key: Finding Yours from the Command Line

Read your Windows 10 or 11 product key with one PowerShell command, why wmic no longer works on Windows 11, and what a blank result or digital licence means.

Windows 10 Product Key: Finding Yours from the Command Line

If you are reinstalling Windows, moving to a new drive or just want a record of your licence, the first question is usually “where is my product key?”. On most modern PCs there is no sticker any more: the key is stored in the firmware by the manufacturer, or there is no key at all because Windows is activated with a digital licence. This guide shows how to read the key from the command line on Windows 10 and Windows 11 in 2026, what to do when the command returns nothing, and why the old wmic method no longer works on current builds.

The quick answer: use PowerShell

Right-click the Start button and choose Terminal (or Windows PowerShell on Windows 10). You do not need to run it as administrator. Then run:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey

If your PC shipped with Windows from Dell, HP, Lenovo, Microsoft Surface or any other big manufacturer, this returns a 25-character key in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. That is the OEM key written into the firmware (the ACPI MSDM table) at the factory. It stays with the motherboard, so it survives a disk wipe and Windows will normally pick it up and activate on its own when you reinstall the same edition.

Windows 10 Start button right-click menu used to open a command prompt

If you prefer the old Command Prompt, you can call the same thing without leaving it:

powershell -NoProfile -Command "(Get-CimInstance SoftwareLicensingService).OA3xOriginalProductKey"

What happened to the wmic command?

The original version of this guide used:

wmic path softwarelicensingservice get OA3xOriginalProductKey

That still works on most Windows 10 machines, and the output looks like the screenshot below. On Windows 11 it is a different story. Microsoft turned WMIC off by default in Windows 11 24H2, removed it in 25H2 and on upgrades to it, and current Windows 11 releases no longer offer it as an optional feature at all. If you type it and get “‘wmic’ is not recognized as an internal or external command”, that is why. Nothing is wrong with your PC: WMI itself is still there, only the old command-line tool has gone, and the PowerShell command above reads exactly the same value.

Command Prompt output showing the OA3xOriginalProductKey value

Avoid Get-WmiObject as a replacement too. It is deprecated and does not exist in PowerShell 7. Get-CimInstance is the supported way and works in both Windows PowerShell 5.1 and PowerShell 7. If you have old batch files that still rely on WMIC, our guide to replacing batch files with PowerShell covers the common swaps.

The command returns nothing. Now what?

A blank result is common and usually fine. It means there is no OEM key in the firmware, which happens when:

  • You built the PC yourself or bought it without Windows, then installed and activated it with a retail key or by upgrading.
  • Windows is activated with a digital licence. Most PCs upgraded free from Windows 7 or 8.1, and many retail purchases from the Microsoft Store, have a licence tied to the hardware and your Microsoft account rather than a key you can read back.
  • It is a work or school device activated through KMS or a subscription, in which case your IT team manages the licence and there is nothing for you to record.

To check whether Windows is activated, go to Settings > System > Activation on Windows 11, or Settings > Update & Security > Activation on Windows 10. If it says “Windows is activated with a digital license linked to your Microsoft account”, you do not need a key at all. After a reinstall or a motherboard change, sign in with the same account and use the Troubleshoot option on that page to reactivate.

Checking which key is installed now

The firmware key is not always the one in use. To see the last five characters of the key Windows is actually using, plus the licence channel (Retail, OEM or Volume), run this from an elevated prompt:

slmgr /dli

Use slmgr /dlv for more detail. Windows does not store the full installed key in a readable form, which is why tools that “recover” it from the registry are hit and miss and are best avoided.

Windows 10 in 2026: worth knowing

Windows 10 reached end of support in October 2025, and the consumer Extended Security Updates year ended in October 2026. If you are reading this because you are moving to Windows 11 on the same PC, the good news is that a valid Windows 10 licence activates the matching edition of Windows 11, so Home goes to Home and Pro to Pro. Make a note of the firmware key anyway; it costs nothing and saves time if activation ever needs a nudge.

FAQ

Can I use the key from my old laptop on a new PC?

Not if it is an OEM key. OEM licences are tied to the device they shipped with. Retail keys can be moved to a new PC, as long as you stop using them on the old one.

Does this work for Windows Server?

The command works, but servers are rarely OEM-activated. For evaluation and volume keys see our guide to Windows KMS, GVLK and evaluation product keys.

Can I activate without an internet connection?

Yes, by phone. Our guide on activating Windows offline walks through it.

🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Intune, Active Directory, PowerShell and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published 770+ practical guides to real-world IT problems. He also builds free Windows utilities, including Ultimate Settings Panel, which has been downloaded over 850,000 times.

4 thoughts on “Windows 10 Product Key: Finding Yours from the Command Line”

  1. Work with OEM and OpenLicense? Because this command line with me doesn’t work.

    1. Yes, I just run it on Windows 10 OEM and working fine. Exactly what version of Windows are you using and have you tried opening the Command Prompt as Admin?

  2. Work with OEM and OpenLicense? Because this command line with me doesn’t work.

    1. Yes, I just run it on Windows 10 OEM and working fine. Exactly what version of Windows are you using and have you tried opening the Command Prompt as Admin?

Comments are closed.

Part of The Geek Network