How to Find Windows 11 Product Key Using CMD: A Step-by-Step Guide

If you’re trying to reinstall Windows 11, transfer a license, troubleshoot activation, or simply keep your license information for your records, you may be wondering how to find Windows 11 product key using CMD. Command Prompt can sometimes reveal a product key stored in your computer’s firmware, although it won’t work for every Windows installation.

Windows 11 activation can use either a traditional 25-character product key or a digital license. That distinction is important because many modern PCs don’t have a recoverable traditional key stored in Windows.

In this guide, we’ll show you how to find Windows 11 product key using CMD step by step. We’ll also explain what to do when CMD doesn’t show a key, how to check your Windows edition, how to use PowerShell and BIOS/UEFI information, and how to understand the difference between a product key and a digital license.

Table of Contents

What Is a Windows 11 Product Key?

A Windows product key is a 25-character code used to activate a Windows edition.

It normally looks like this:

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

A product key is different from a digital license.

A product key is a character-based code you can enter during Windows activation.

A digital license is an activation entitlement associated with your device and, in some cases, your Microsoft account.

That’s why you may not always be able to retrieve a 25-character key from a fully activated Windows 11 PC.

Can You Find a Windows 11 Product Key Using CMD?

Yes, but only under certain circumstances.

If your computer’s manufacturer stored the Windows key in UEFI/BIOS firmware, Command Prompt may be able to retrieve it.

However, CMD may return nothing if:

  • Windows uses a digital license.
  • The key isn’t stored in firmware.
  • The PC was upgraded from another Windows version.
  • A different product key was used during installation.
  • The device uses volume licensing.
  • The original key isn’t recoverable from the current installation.

So, how to find Windows 11 product key using CMD depends on where the license information is stored.

Before You Start: Check Your Windows Edition

Before looking for a product key, determine which Windows edition you’re running.

Press:

Windows + R

Type:

winver

and press Enter.

You can also open:

Settings → System → About

Look under Windows specifications.

You’ll typically see an edition such as:

  • Windows 11 Home
  • Windows 11 Pro
  • Windows 11 Enterprise
  • Windows 11 Education

The product key or license must correspond to the appropriate Windows edition.

Method 1: Find Windows 11 Product Key Using CMD

This is the most commonly searched method.

Step 1: Open Command Prompt as Administrator

Press the Windows key.

Search for:

Command Prompt

Right-click Command Prompt.

Select:

Run as administrator

If User Account Control asks for permission, select Yes.

Step 2: Enter the Product-Key Command

In Command Prompt, enter:

wmic path softwarelicensingservice get OA3OriginalProductKey

Press Enter.

Step 3: Check the Result

If your computer has an original OEM Windows key stored in its firmware, CMD may display a 25-character key.

For example, the output structure may look like:

OA3OriginalProductKey
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

The example above is only a format illustration, not a real product key.

Step 4: Save the Key Securely

If a valid key appears, store it somewhere secure.

Avoid posting your product key publicly or sharing it in screenshots.

Treat it like a software license credential.

Why Does the CMD Command Sometimes Show Nothing?

This is one of the most important things to understand.

If you run:

wmic path softwarelicensingservice get OA3OriginalProductKey

and see only:

OA3OriginalProductKey

with no key underneath, your PC may not have an OEM key stored in firmware.

That doesn’t necessarily mean Windows isn’t activated.

Your computer may be activated using a digital license instead.

Method 2: Find the Windows 11 Product Key Using PowerShell

If the CMD method doesn’t work, you can try PowerShell.

Open Windows PowerShell or Terminal as administrator.

Run:

(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3OriginalProductKey

If a firmware-embedded key exists, it may be displayed.

On newer Windows 11 installations, PowerShell can also be used with CIM:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

Press Enter.

If a key exists in firmware, it should appear as a 25-character string.

Method 3: Use Windows Terminal

Windows 11 includes Windows Terminal on many installations.

You can use either Command Prompt or PowerShell through Terminal.

Open Windows Terminal

Right-click the Start button.

Select:

Terminal (Admin)

Then open a Command Prompt tab or PowerShell tab.

For PowerShell, use:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

For Command Prompt, use:

wmic path softwarelicensingservice get OA3OriginalProductKey

The result depends on whether a firmware-embedded product key exists.

Is WMIC Still Available in Windows 11?

Microsoft has been retiring the legacy WMIC utility in newer Windows releases.

As a result, the traditional wmic command may not be available on every Windows 11 installation.

If you receive an error such as:

'wmic' is not recognized as an internal or external command

don’t panic.

Use PowerShell instead:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

This is a useful alternative on newer Windows installations.

Method 4: Find Your Windows License Information With Slmgr

Windows includes the Software Licensing Management Tool, commonly called slmgr.

Open Command Prompt as administrator.

Run:

slmgr /dli

This displays basic licensing information.

You can also run:

slmgr /dlv

for more detailed license information.

Another useful command is:

slmgr /xpr

This checks the activation expiration status.

Important Difference

These commands generally do not reveal your full 25-character product key.

Instead, they provide information about the installed license and activation state.

This distinction prevents a common mistake: assuming that slmgr can always recover your original Windows product key.

Method 5: Check the Last Five Characters of the Installed Key

Windows can show the last five characters of the installed product key.

Open Command Prompt as administrator and run:

slmgr /dli

Depending on your Windows configuration, the output may include the last five characters of the installed product key.

This can help you identify which key is currently installed when you have multiple license records.

However, it does not reveal the complete key.

Method 6: Check Windows Activation Status

If your goal is simply to determine whether Windows is activated, you may not need the full product key.

Go to:

Settings → System → Activation

Here you can see whether Windows is activated.

You may see information indicating activation through:

  • A digital license
  • A digital license linked to your Microsoft account
  • A product key

This is often more useful than recovering the original key.

Product Key vs Digital License

These two terms are frequently confused.

Feature Product Key Digital License
Format 25-character code No visible key required
Can be typed manually Yes Usually unnecessary
May be stored in firmware Yes Not necessarily
Can be associated with Microsoft account Sometimes Yes, in applicable cases
Always recoverable with CMD No No
Used for activation Yes Yes

If Windows is activated with a digital license, there may simply be no full product key available for CMD to display.

How to Tell Whether Your PC Has an OEM Key

A manufacturer-installed Windows license may be embedded in the computer’s UEFI firmware.

This is common with PCs that were sold with Windows preinstalled.

Try:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

If a 25-character key appears, your computer may have an OEM key stored in firmware.

If nothing appears, it could mean that the firmware doesn’t contain a key.

It does not automatically mean Windows isn’t licensed.

What Is an OEM Product Key?

OEM stands for Original Equipment Manufacturer.

An OEM Windows license is generally supplied with a computer by its manufacturer.

The key may be embedded in firmware instead of printed on a sticker.

For example, a laptop purchased with Windows preinstalled may contain its Windows license information in UEFI.

This makes reinstalling the correct Windows edition easier because the installer can sometimes detect the embedded key automatically.

What If You Upgraded From Windows 10?

If your Windows 11 installation originated from a Windows 10 upgrade, you may not have a traditional Windows 11 product key.

Your activation may instead be represented by a digital license.

This is one reason the CMD command may return nothing.

If Windows is activated, check:

Settings → System → Activation

rather than assuming you need to recover a 25-character key.

What If I Bought Windows From a Retail Store?

Retail Windows licenses may have been supplied with:

  • A product key card
  • Digital purchase information
  • An email containing the key
  • A Microsoft account purchase record

If the key isn’t stored in firmware, the UEFI/CMD method may not find it.

In that situation, check the original purchase documentation or account associated with the license.

What If I Bought a Prebuilt PC?

If Windows came preinstalled on your desktop or laptop, check whether the manufacturer included an OEM license.

First try:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

If no key appears, check the computer manufacturer’s documentation and your Windows activation status.

How to Save Your Windows Product Key

If CMD or PowerShell displays a valid product key, store it securely.

Good options include:

  • An encrypted password manager
  • Secure offline documentation
  • A protected personal backup

Avoid storing your key in:

  • Public posts
  • Online forums
  • Screenshots shared publicly
  • Unsecured cloud documents
  • Messages sent to strangers

A Windows product key is valuable licensing information.

Can You Find the Product Key in the Windows Registry?

You may see websites claiming that the full Windows product key can always be recovered from the Registry.

That’s misleading.

Modern Windows activation doesn’t necessarily store a recoverable full product key in the Registry.

Some tools can decode certain stored licensing information, but the result may not be the original key used to activate the system.

For that reason, don’t assume Registry-based methods will always work.

Why Does My Product Key Not Match the One I Purchased?

You may encounter multiple keys associated with the same Windows installation.

For example, Windows can contain a generic/default installation key while activation is actually provided through another licensing mechanism.

This is why a key shown by a utility isn’t automatically proof that it is the key you purchased.

If activation is working, focus on the license status and documentation associated with your purchase.

How to Find a Windows 11 Product Key Before Reinstalling

If you’re planning to reinstall Windows 11, first check your activation status.

Go to:

Settings → System → Activation

If Windows is activated through a digital license, you may not need to manually recover a product key.

During installation, Windows may allow you to select:

I don’t have a product key

You can then install the correct Windows edition and activate it later, assuming the PC has a valid activation entitlement.

How to Find Your Product Key on a Laptop

For laptops that originally shipped with Windows:

  1. Open Windows Terminal as administrator.
  2. Run:
(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey
  1. Check whether a key appears.
  2. Record it securely if one is returned.
  3. Verify your Windows edition.

If nothing appears, check the activation page and original purchase documentation.

How to Find Your Product Key on a Desktop PC

The same method works on many desktop PCs.

Open Terminal or PowerShell as administrator and run:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

If the motherboard firmware contains an OEM key, Windows may return it.

Otherwise, you may need to rely on your purchase documentation or digital license information.

Troubleshooting: CMD Doesn’t Show My Product Key

If CMD doesn’t return a key, work through this checklist.

1. Try PowerShell

Use:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

2. Check Activation

Open:

Settings → System → Activation

3. Confirm Your Windows Edition

Open:

Settings → System → About

4. Check Whether the PC Came With Windows

Manufacturer-installed Windows may use an embedded OEM key.

5. Check Your Purchase Records

Retail licenses may have been supplied separately.

6. Check Your Microsoft Account

A digital license may be associated with your account rather than a recoverable product key.

Troubleshooting: WMIC Is Not Recognized

If you run:

wmic path softwarelicensingservice get OA3OriginalProductKey

and Windows says WMIC isn’t recognized, use PowerShell/CIM instead:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

Windows 11 versions can differ in which legacy management tools are available.

Troubleshooting: PowerShell Returns a Blank Result

A blank result usually means the queried firmware location doesn’t contain an OEM product key.

Possible explanations include:

  • Digital license activation
  • Retail license
  • Volume licensing
  • No firmware-embedded key
  • Different licensing arrangement

Check the activation status before assuming there is a problem.

Is It Legal to Retrieve Your Own Windows Product Key?

Yes. Checking the license information associated with your own Windows installation is a normal troubleshooting and record-keeping activity.

However, finding a product key doesn’t grant ownership of a Windows license that you don’t already have.

Use product keys only according to their licensing terms.

Can CMD Activate Windows With the Product Key?

CMD can be used with Windows licensing commands, but simply knowing a key doesn’t guarantee activation.

Activation depends on:

  • The validity of the key
  • Windows edition
  • License terms
  • Microsoft’s activation systems
  • Whether the key has already been used in a way that prevents additional activation

If you own a valid key, Windows Settings provides a straightforward way to enter it:

Settings → System → Activation

Frequently Asked Questions

How do I find my Windows 11 product key using CMD?

Open Command Prompt as administrator and run:

wmic path softwarelicensingservice get OA3OriginalProductKey

If WMIC isn’t available, use PowerShell:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

A key appears only when the relevant firmware contains an OEM product key.

Why doesn’t CMD show my Windows 11 product key?

Your PC may use a digital license, a retail key that isn’t stored in firmware, volume licensing, or another activation method. A blank result doesn’t necessarily mean Windows isn’t activated.

Can PowerShell find my Windows 11 product key?

Yes, PowerShell can query the firmware licensing information with:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

It will only return a key if one is available through that firmware licensing location.

Can I find my Windows 11 product key in Settings?

Settings can show your activation status and provide options to change a product key, but it doesn’t necessarily display the full 25-character key.

Does Windows 11 always have a product key?

No. Windows 11 can be activated with a digital license, so there may not be a full product key you can recover from the operating system.

Will I need my product key to reinstall Windows 11?

Not always. If the PC has a valid digital license, you can often reinstall the same Windows edition and activate it after connecting to the internet.

Is the product key shown by CMD always the key used to activate Windows?

Not necessarily. A firmware-embedded OEM key can be different from other keys associated with an installation. Always consider the activation method and your purchase documentation.

Final Thoughts

Knowing how to find Windows 11 product key using CMD can be useful when you’re preparing for a reinstall, troubleshooting activation, or documenting the license associated with your PC.

The classic CMD command is:

wmic path softwarelicensingservice get OA3OriginalProductKey

However, WMIC isn’t available on every newer Windows 11 installation. In that situation, use PowerShell or Windows Terminal:

(Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey

Remember that these commands primarily look for an OEM product key stored in firmware. If they return nothing, your Windows installation may still be completely legitimate and activated through a digital license.

Before reinstalling Windows, check Settings → System → Activation, confirm your Windows edition, and keep any genuine purchase information in a secure location.

Quick Command Reference

Purpose Command
Find firmware product key with WMIC wmic path softwarelicensingservice get OA3OriginalProductKey
Find firmware product key with PowerShell (Get-CimInstance -ClassName SoftwareLicensingService).OA3OriginalProductKey
Show basic license information slmgr /dli
Show detailed license information slmgr /dlv
Check activation expiration/status slmgr /xpr

Key Takeaways

  • You can sometimes find a Windows 11 product key using CMD.
  • The classic WMIC command works when WMIC is available and a firmware key exists.
  • PowerShell’s Get-CimInstance method is a useful alternative on newer Windows 11 systems.
  • A blank result does not necessarily mean Windows is unlicensed.
  • Many PCs use digital licenses instead of a recoverable 25-character key.
  • slmgr can show licensing information but generally doesn’t reveal the complete product key.
  • Always verify your Windows edition before reinstalling.
  • Keep genuine product keys and license information private.
  • If Windows is activated with a digital license, you may not need to recover a product key before reinstalling the same edition.
Replace outdated WMIC instructionsRemove repetitive laptop and desktop sections