To find your Windows 11 product key with Command Prompt, open Command Prompt as administrator and run this command: powershell "(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey". This reads an original OEM key stored in the PC’s firmware, if one is present. A blank result does not prove that Windows has a digital license or is activated. It does not recover every separately purchased retail key or a later edition-upgrade key.
Older guides tell you to use a wmic command. Microsoft has removed WMIC from current versions of Windows 11, so that command no longer works. The command above uses PowerShell to read the same information.
How to Find Your Product Key Using Command Prompt
- Click Start and type cmd.
- Right-click Command Prompt and choose Run as administrator. See other ways to open Command Prompt.
- Copy and paste this command, then press Enter:
powershell "(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey" - If a 25-character key appears, save it privately. If the prompt returns without a key, use the checks below. This command reads licensing information; it does not activate Windows or change your license.

You can also open PowerShell and run (Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey directly.
Windows 10: Find an OEM Key With Command Prompt
On Windows 10, search Start for cmd, right-click Command Prompt, and choose Run as administrator. Run powershell "(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey", then press Enter. The query reads an original OEM key from firmware when one exists; it does not activate Windows, change the key, or recover every retail or upgrade key. Keep any returned key private.
To check Windows 10 activation separately, open Settings > Update & Security > Activation. A blank command result does not establish activation or a digital license. Microsoft’s product-key guide for Windows 10 and 11 explains where purchase keys are kept and when a digital license replaces a key. Check your purchase records or manufacturer if needed; the Product ID in About is not the full product key.
What If No Key Shows Up?
A blank result means this query did not return a firmware key. There are several possible explanations, so check your activation status and how you obtained Windows rather than assuming that no key is needed:
- Your PC may use a digital license. Microsoft explains that a digital license activates Windows without a product key.
- You bought Windows separately, so the key is in your purchase email, on the card in the box, or in the retailer’s online account. For a purchase from Microsoft’s website, check the confirmation email and Microsoft order history.
- Your PC is managed by a work or school, which may use its own activation.
Open Settings > System > Activation, then expand Activation state if needed to read the details. A digital-license message confirms that activation method; an error or inactive status needs troubleshooting. This Settings page does not display a full 25-character key.

Find a Separately Purchased Windows 11 Key
If the command is blank or the firmware key belongs to the PC’s original edition, check your purchase records. A boxed copy normally includes a key on a card or label. For a digital retail purchase, look in the seller’s confirmation email or its online account. If Windows came with a new or refurbished PC, check its packaging or Certificate of Authenticity and contact the manufacturer or refurbisher if necessary. For a work or school license, ask the organization’s IT team. Microsoft’s product-key guide explains the different purchase types.
Do You Need a Key to Reinstall?
If this device already has a digital license, Microsoft says you can reinstall the same Windows 11 edition on the same device without entering a key. Check the edition and activation details before reinstalling, and back up your files first. A major hardware change can require reactivation. Finding an original firmware key alone does not confirm that a different edition is licensed.
Why a Registry Entry Is Not a Reliable Key-Finding Method
The Windows Product ID is not your 25-character product key, and a registry value should not be assumed to establish the license for the edition you currently use. Use the firmware query above for an original OEM key and your purchase records for a retail or upgrade key. Check Settings > System > Activation separately. A digital license may not need a recoverable key. Do not edit registry values to try to activate Windows or turn a displayed identifier into a license.
If the Command Reports an Error
Make sure you pasted the command into Command Prompt using straight quotation marks. If you opened PowerShell instead, use the shorter command above. On an organization-managed PC, contact IT if access is restricted. An error differs from a successful query that returns no key. Do not install a key-finder download simply because the old WMIC command is unavailable.
Frequently Asked Questions
Is it safe to share my product key?
No. Treat it like a password. Keep it out of public screenshots, comments, and support posts. Finding a key does not establish that its license can be transferred to another computer.
How do I use the key to activate Windows?
See how to activate Windows 11. On an older PC, see how to activate Windows 10.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are tested on current devices or checked against official product documentation, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.