How to Find Windows 11 Product Key Using CMD

When you need to reinstall or activate Windows 11, the product key becomes essential—but finding it isn’t always straightforward. Especially for users with pre-installed systems, the key might not be visible on the device or packaging. Fortunately, Windows includes tools to help. One of the most efficient and beginner-friendly methods is using Command Prompt (CMD). With just a simple command, you can retrieve the embedded product key stored in your system’s BIOS or registry. This can save you from costly mistakes during reinstallation or system upgrades. In this step-by-step guide, we’ll walk you through how to find Windows 11 product key using CMD, explain the command syntax, share practical usage examples, and offer solutions in case the command doesn’t return the key. Whether you’re preparing for a clean install or just backing up your activation info, this guide ensures you get the job done quickly and safely.
Command Overview
The Command Prompt (CMD) is a powerful built-in utility in Windows 11 that allows users to execute text-based commands to interact directly with the system. It’s widely used for administrative tasks, system diagnostics, and automation—but it also proves useful for retrieving product keys, especially on OEM-installed systems.
To extract the product key, the most commonly used command is wmic
, short for Windows Management Instrumentation Command-line. This tool accesses the WMI infrastructure, which stores vital system and licensing information. With the correct syntax, wmic
can pull the Windows product key embedded in the BIOS or UEFI firmware—typically placed there by PC manufacturers for systems shipped with Windows pre-installed.
However, it’s important to understand this method’s limitations. If your system is activated via a digital license linked to your Microsoft account (common with free upgrades or newer devices), wmic
may return a blank result or a generic key that isn’t usable for reinstallation.
Overall, CMD provides a quick and reliable way to retrieve the key on many systems, without needing third-party software. It’s a smart first step before any major OS change.
Basic Syntax + Steps
To find your Windows 11 product key using CMD, the core command is:
wmic path softwarelicensingservice get OA3xOriginalProductKey
This command queries your system’s BIOS or UEFI firmware to retrieve the embedded OEM product key. It’s a straightforward and fast method that doesn’t require internet access or any third-party software, making it ideal for quick access to your product key. Here are the detailed steps to execute the command:
Step 1: Press Win + S, type cmd, then right-click on Command Prompt and select Run as administrator. This ensures you have the necessary permissions to run the command.
Step 2: In the Command Prompt window, type the above command exactly and press Enter.
Step 3: If your PC has an embedded product key, it will immediately display a 25-character alphanumeric code in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
.
Step 4: Be sure to carefully copy this product key and save it in a safe, secure location. You will need this key for future Windows reinstallation or activation purposes.
Note: If nothing appears after running the command, it likely means your system uses a digital license linked to your Microsoft account, and the product key is not stored in the firmware.
Parameter Explanation
Here are the key parts of the command:
wmic
: Starts the Windows Management Instrumentation Command-line tool.path softwarelicensingservice
: Targets the software licensing module.get OA3xOriginalProductKey
: Retrieves the OEM-installed product key from BIOS/UEFI.
Usage Examples
Below are 6 practical scenarios where you can use CMD or PowerShell to check or retrieve product key and license information in Windows 11, along with a file recovery example using Winfr.
Example 1: Use CMD to find OEM key
Step 1: Press Win + S
, type cmd, right-click and choose Run as administrator.
Step 2: Enter the command above and press Enter.
Step 3: If your system has an embedded OEM key, it will appear immediately.
wmic path softwarelicensingservice get OA3xOriginalProductKey
Use case: Ideal for retrieving the original key from pre-installed Windows 11 systems.
Example 2: Use PowerShell alternative
Step 1: Open PowerShell as administrator.
Step 2: Run the command and view the embedded key if available.
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
Use case: A scripting-friendly alternative to CMD for the same function.
Example 3: Recover Deleted Files Using Winfr
Step 1: Open PowerShell as Administrator.
Step 2: Run the command below to recover deleted files from drive C: to a recovery folder on drive D:
winfr C: D:\Recovery /regular /n *
Explanation: This command uses Windows File Recovery (winfr) to scan the C: drive in regular mode and recover all recoverable deleted files, saving them to the D:\Recovery folder. It’s a powerful tool when you need to restore files lost during system reinstallation or accidental deletion.
Example 4: Check activation status
Step 1: Run CMD as Administrator.
Step 2: Type the command to see if Windows is permanently activated.
slmgr /xpr
Use case: Confirms activation status for license verification or troubleshooting.
Example 5: View license details
Step 1: In elevated CMD, execute the command.
Step 2: A dialog box will display details such as activation ID, license status, and key channel.
slmgr /dlv
Use case: Useful for diagnosing activation or licensing issues.
Example 6: Display basic license info
Step 1: Get a concise summary of your Windows license type and partial product key.
Step 2: Run this command in CMD.
slmgr /dli
Use case: Quick check of current license status without full details.
Common Issues & Precautions
Here are five frequent problems users face with product key commands:
- No key returned – Usually indicates your Windows uses a digital license.
- Permission denied – You must run CMD or PowerShell as administrator.
- Command not recognized – Typo or incorrect syntax; retype carefully.
- Slmgr delay – Slmgr-based commands may take a few seconds to respond.
- Wrong command context – Using
wmic
in PowerShell without the right syntax causes errors.
What to Do If Command Fails (Use WinfrGUI)
If CMD and PowerShell don’t return your key, it’s likely your PC uses a digital license. However, if you’re trying to recover lost documents or license-related files, WinfrGUI is a great alternative. It is a free graphical tool based on the official winfr
command. It recovers deleted Word, Excel, image files, and more—without needing to use the command line. It’s beginner-friendly and fully free.
Steps to Use WinfrGUI:
- Download and install WinfrGUI from the official site.
- Launch the program and select the drive where your files were deleted.
- Choose the specific file types you want to recover or select all.
- Click Start Recovery to begin scanning and restoring your files.
Related Command Recommendations
To extend your knowledge, here are 4 helpful Windows commands:
- slmgr /xpr – Check whether your copy of Windows is permanently activated.
- slmgr /dli – Get basic license information.
- winfr – Command-line tool to recover deleted files.
- PowerShell key check –
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
Conclusion
Now you know exactly how to find windows 11 product key using cmd. This method is straightforward and effective for systems with OEM product keys embedded in the BIOS or UEFI firmware. However, if your Windows 11 uses a digital license linked to your Microsoft account, CMD won’t be able to retrieve the product key. In such cases, you can use the slmgr
command to check your activation status and ensure your system is properly licensed.For those who need to recover files related to activation or system installation, WinfrGUI offers a user-friendly solution. It simplifies the powerful Windows File Recovery tool with an intuitive interface, making it accessible for both beginners and advanced users. Whether you want to restore important files or troubleshoot licensing issues, these tools together provide a reliable way to manage your Windows 11 system keys and data recovery needs.
🔗 Also Read: Fix “error: failed to push some refs to” and Recover Files