Yes, you can easily retrieve your Windows 11 serial number directly from the Command Prompt (cmd) with minimal steps. This method works whether you want the product key for activation, OS version verification, or troubleshooting—no third-party software required. The serial is stored in Windows’ registry and system files, but CMD provides the fastest, most reliable way to access it. The only prerequisites are Administrative permissions (run CMD as admin) and a valid Windows license (or a product key for trial/genuine systems).

What You'll Need

  • Windows 11 computer (desktop or laptop)
  • Admin or User privileges to open Command Prompt
  • Windows 11 (fully installed or OEM preloaded)
  • Notebook or file to record the output
  • Optional: A valid Windows 11 product key (if not installed via OEM)

Step-by-Step

  1. Open Command Prompt as Administrator
    1. Press Win + S, type cmd, then right-click Command Prompt and select Run as administrator. For Windows 11 on tablets or 2-in-1 devices, press the Power button, hold Shift, then click Restart. During reboot, hold Shift again to access the Troubleshoot menu, then select Command Prompt (Admin).
  2. Run the first CMD command to display the hardware ID
    1. Type the following command and press Enter: wmic csproduct get uuid
    2. Observe the output—it will list the UUID (Universally Unique Identifier) associated with your PC. This is not the product key but a unique identifier tied to your hardware.
  3. Extract the product key from the UUID
    1. If your PC is OEM pre-installed (e.g., Dell, HP, Lenovo), Windows uses a hidden key tied to your hardware. To extract it without a retail key: for /f "tokens=2 delims=," %a in ('wmic csproduct get UUID ^| find "PRODUCTKEY"') do @echo %a
    2. If you have a retail key (installed via USB or digital license), skip this step—the key will appear in the next step.
  4. Fetch the product key using productkey command
    1. Type: slmgr /dli
    2. Press Enter. The command will output your product key if Windows is activated. Look for an 18-character alphanumeric string (e.g., XYZ1-2AB3-CDEF-4GHI-5JKL).
  5. Use slmgr /xpr to verify installation type
    1. Type: slmgr /xpr and press Enter.
    2. The output will show: - lic_type: K (Key) for retail, L (License) for OEM, or M (Mobile Device). - inst_type: 1 for retail, 2 for OEM.
    3. If lic_type is L (OEM), you’ll need the hidden key from Step 3.

If That Did Not Work

  1. Restart your PC and try slmgr /dli again—sometimes Windows caches incorrect responses.
  2. If the key is missing entirely, your Windows may need reactivation. Use to reinstall if you have a valid key.
  3. For OEM systems, manually run: wmic path win32_product get name, identifier | findstr /i "Windows 11" to log in to Microsoft’s activation server for validation.
  4. If all else fails, check the receipt or original packaging for the key (for retail installs) or contact your PC manufacturer (for OEM systems).

Common Mistakes

  • Running CMD without admin rights The slmgr commands require elevated permissions. Always open CMD as Administrator.
  • Ignoring OEM vs. retail differences OEM systems rely on hardware UUIDs; retail keys are standalone. Mixing them up may cause errors.
  • Copy-pasting the UUID incorrectly The UUID command returns a single line. Use the exact syntax above to extract the key—copying the whole output may include extra characters.
  • Using a trial/genuine key mix-up Trial keys reset after 30 days. Ensure you’re using the lic_type appropriate for your install.

Tips

  • Backup your key Write down the product key immediately after running slmgr /dli. Store it offline (e.g., printed or in a password manager) to avoid re-entry errors.
  • Check for OEM restrictions Some OEMs block key extraction via CMD. If slmgr fails, try diskpart + wmic methods (see Troubleshooting).
  • Use in bulk for IT admin Script the commands in a batch file for multiple PCs: @echo off for /f "tokens=2 delims=," %%a in ('wmic csproduct get UUID ^| find "PRODUCTKEY"') do @echo %%a
  • Avoid online decoders Some websites claim to decode the UUID—Windows’ built-in tools are more reliable and secure.

Troubleshooting

  1. No output from slmgr /dli
    • Run slmgr /upk to uninstall current keys, then retry.
    • Try wmic path win32_softwareinstall get licensedproductid (may return a placeholder).
    • If Windows is not installed, format the drive and reinstall.
  2. Key appears wrong or repeated
    • Use slmgr /dli again after a clean reboot.
    • Manually enter the key via slmgr /ipk [key] to reset.
    • For OEMs, use: for /f "tokens=2 delims=," %%a in ('wmic csproduct get UUID ^| find "PRODUCTKEY"') do @slmgr /ipk %%a
  3. System says "Windows is not activated"
    • Grab the key from slmgr /dli or slmgr /xpr and run: slmgr /ipk [key]
    • For OEMs, use the UUID method: slmgr /upk + slmgr /ato (automatic setup).
  4. Commands return errors like "Error: 0x80070005"
    • This means "Access Denied." Open CMD as Admin again.
    • If permissions persist, check for antivirus firewall blocking CMD.
  5. The PC is a secondary install (e.g., from an ISO)
    • Run slmgr /ipk [key] with the original retail key during setup.
    • If the key is lost, use diskpart + wmic to identify the original drive partition.

Frequently Asked Questions

How do I find my Windows 11 serial number if I don’t have it?

Run slmgr /dli in Command Prompt (Admin) to extract the current product key. For OEM systems, use for /f "tokens=2 delims=," %a in ('wmic csproduct get UUID ^| find "PRODUCTKEY"') to fetch the hidden key.

Can I use CMD to check if Windows 11 is activated without a key?

No. CMD won’t reveal activation status unless you provide the key or the system is OEM. Use slmgr /xpr to confirm the license type (K = retail, L = OEM), but you’ll still need the key to verify activation.

Why does my OEM PC’s UUID method sometimes fail?

Some OEMs (e.g., Dell, HP) implement stricter activation locks. If the UUID command returns nothing, try diskpart + wmic to list all products on the system and check for Windows 11 entries.

Is there a way to bypass the OEM key using CMD?

No. OEM activation relies on hardware binding. CMD cannot bypass manufacturer restrictions. For IT admins, consider using Microsoft’s slmgr /ato (automatic setup) if you have the original key.

Can I use this method on a Windows 11 tablet (2-in-1)?

Yes, but you must use the full CMD menu path (Windows + S > CMD > Right-click > Run as Admin). The commands work identically to desktops.

What if I get a "Key not found" error?

Run slmgr /upk to remove existing keys, then retry. If the key is still missing, your Windows may be a trial or unlicensed install—contact support for a valid license.