How to Find a Windows 11 Product Key Using Command Line Tools

//

Michael Collins

A Windows 11 PC may activate with a digital license instead of a product key you need to retrieve. Before using Command Prompt or PowerShell, check Settings > System > Activation. If Windows reports a digital license, there may be no need to find or enter a key for a normal reinstall of the same Windows edition on the same device.

Check Activation First

  1. Open Settings.
  2. Select System > Activation.
  3. Review the activation status.
  4. Note whether Windows says it is activated with a digital license.

Can CMD Show the Windows Product Key?

Older tutorials often use Windows Management Instrumentation commands to query an OEM key stored in firmware. These commands can return a firmware-embedded key on some PCs, return nothing on others, or fail because the older WMIC command-line tool is deprecated or unavailable. A firmware key also is not proof that it is the credential currently responsible for Windows activation.

Use Command Prompt to Query an Embedded OEM Key

If you specifically need to check whether the PC firmware exposes an OEM key, open Command Prompt and run the following command:

powershell “(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey”

This launches PowerShell’s CIM interface from Command Prompt and asks Windows for an OEM key stored in firmware. The result can be blank on systems without such a key. A returned firmware key is also not proof that it is the credential currently responsible for Windows activation. Treat any returned key as sensitive information and do not publish screenshots containing it.

Older guides often show a wmic command instead. WMIC is deprecated and may be unavailable on current Windows 11 installations, so the CIM-based query is the more appropriate diagnostic.

For most users, the safer path is still to check Activation and legitimate purchase records before trying to retrieve a key.

Digital License vs. Product Key

Microsoft says Windows 11 uses either a digital license or a 25-character product key, depending on how Windows was obtained. A digital license does not require you to find a key on the PC. Microsoft also says a digitally licensed device can reinstall the same Windows 11 edition without entering a product key.

Where Else Can the Product Key Be?

Depending on how Windows was purchased, a legitimate key can be associated with the device, packaging, a Certificate of Authenticity, retailer records, or qualifying Microsoft purchase records. Use those sources before downloading a third-party key-finder utility.

Avoid Unknown Product-Key Tools

Third-party key finders can show generic installation keys, firmware keys, or other values that do not represent the active license. Installing an unknown system utility also creates unnecessary security risk.

Summary

Check Settings > System > Activation first. A digital license often means you do not need a product key at all. Command-line queries can sometimes expose an OEM key stored in firmware, but that value should not be assumed to represent the license currently activating Windows.