Find Your Windows Product Key Using CMD
In this article
You can use Command Prompt (CMD) to check whether Windows has a product key stored in the computer’s firmware. This is a quick, read-only check, but it does not reveal every kind of Windows license: many PCs activate with a digital license, and some installations have no retrievable key. You’ll need access to the PC and permission to open Command Prompt; administrator rights are not usually required for the command below.
What You'll Need
- A Windows PC where you want to check for a key.
- Access to Command Prompt. A standard user account is generally enough.
- A safe place to record the result if a key is displayed. Treat a full product key like sensitive account information.
Step-by-Step
- Open Command Prompt. Select Start, type
cmdorCommand Prompt, then open the app. You can also press Windows + R, entercmd, and select OK. Do not choose “Run as administrator” unless a command specifically requires it. - Enter the firmware-key command. At the prompt, type or paste
wmic path softwarelicensingservice get OA3xOriginalProductKey, then press Enter. Check the spelling, including the spaces, before running it. - Read the output. If Windows reports a 25-character key in five groups separated by hyphens, the computer’s firmware contains an OA3 key. It is usually the original key supplied by the PC manufacturer, rather than a record of every key used on the device.
- Record it carefully, if needed. Copy the displayed value accurately and store it somewhere private, such as an encrypted password manager. Avoid posting it in a forum, sending it in an ordinary email, or including it in a screenshot you share publicly.
- Understand what the result means. A displayed key may help identify the original Windows license, but it does not by itself prove that the current installation is activated or that the key can activate a different PC. Check activation separately: open Settings > System > Activation in Windows 11, or Settings > Update & Security > Activation in Windows 10.
- If the command returns nothing, use other records. Check the PC’s documentation, the packaging or Certificate of Authenticity label on older devices, and the confirmation email or account used when Windows was purchased. For a Microsoft Store purchase, review the order history for the account that placed the order. A blank result does not automatically mean Windows is unlicensed.
Important: This command checks for the firmware-embedded OA3 key. It does not extract a key from a Microsoft account, retrieve a retail key from Microsoft’s activation servers, or reliably show a key used to activate a volume-licensed installation. If you are reinstalling Windows on the same PC, setup often detects the firmware key or digital license automatically; you may be able to choose I don’t have a product key and install the matching edition.
Common Mistakes
- Assuming a blank result means there is no license. A blank result usually means this particular firmware-key query did not find an OA3 key. Windows may instead be activated by a digital license, or the key may be documented elsewhere.
- Expecting the command to show the current activation key. The command queries the original key embedded in firmware. It is not a general-purpose way to recover every key associated with Windows.
- Confusing the key with proof of activation. A key can be present even when Windows is not currently activated. Conversely, Windows can be activated without displaying a full key.
- Using a key on another computer without checking its license. OEM licenses are generally tied to the original device. Retail and organization-managed licenses have different terms. Check the license terms or ask the seller or IT administrator before transferring or reusing a key.
- Running unrelated “key finder” commands or downloads. Avoid tools that promise to bypass activation or expose credentials. Use Windows Settings and trusted Microsoft or device-manufacturer support channels.
Tips
- To select and copy text in a Command Prompt window, highlight the output and use the window’s copy function or the supported keyboard shortcut. Paste it into a secure location only if you need to keep it.
- Check the Windows edition before reinstalling. A Home license generally will not activate Pro, and vice versa. Find the edition under Settings > System > About.
- If you are preparing to reinstall, first check activation status and back up important files. A digital license is commonly reactivated when you reinstall the same edition on the same hardware and connect to the internet.
- On a work or school computer, contact the IT administrator before changing or reinstalling Windows. The device may use organization-managed activation.
Troubleshooting
- “wmic is not recognized” or the command fails: Some newer Windows installations no longer include the WMIC command-line utility. This does not mean the PC has no license. You can try the built-in PowerShell alternative: open PowerShell and run
(Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey. If it returns an empty line, no firmware key was reported. - The output is blank: Check that you entered the command correctly and that you are on the PC you want to inspect. If it remains blank, check for a digital license in Activation settings and look for purchase or manufacturer records. There may be no key available to display.
- “Access is denied” or another permission error: Close the window, reopen Command Prompt using Run as administrator, approve the User Account Control prompt, and try again. Do not change system licensing settings just to run a read-only query.
- Windows says it is not activated: Open Activation settings and follow the displayed troubleshooter or sign in with the Microsoft account associated with the digital license. Confirm that the installed edition matches the license. For a device managed by an employer or school, contact IT; for a newly purchased PC, contact the seller or manufacturer.
- The key is rejected during setup or activation: Verify every character and confirm the Windows edition and device match the license. Do not keep trying keys from unofficial websites. Use Microsoft’s activation support or the PC manufacturer for help with a legitimate purchase.
Frequently Asked Questions
Does this command work on Windows 10 and Windows 11?
Yes, if WMIC is available on that installation. If it is not, try the PowerShell command in Troubleshooting.
Why does Command Prompt show nothing?
The PC may not have an OA3 key stored in firmware. It could be activated with a digital, retail, or organization-managed license instead.
Is the key shown the one currently being used?
Not necessarily. It is the firmware-embedded original key, if one exists; it may not match the method currently activating Windows.
Can I use the key to activate a different PC?
Do not assume so. Many manufacturer-provided OEM licenses are tied to the original device. Check the specific license terms before transferring a license.
Can I find a digital license’s full product key with CMD?
Usually not. A digital license can activate Windows without a recoverable 25-character key. Check Activation settings and your purchase records instead.
Is it safe to share the key?
No. Keep a full key private and share it only through a trusted support channel when necessary. Never publish it online.