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
-
Open Command Prompt as Administrator
- Press
Win + S, typecmd, then right-click Command Prompt and selectRun as administrator. For Windows 11 on tablets or 2-in-1 devices, press thePowerbutton, holdShift, then clickRestart. During reboot, holdShiftagain to access the Troubleshoot menu, then select Command Prompt (Admin).
- Press
-
Run the first CMD command to display the hardware ID
- Type the following command and press
Enter:wmic csproduct get uuid - 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.
- Type the following command and press
-
Extract the product key from the UUID
- 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 - If you have a retail key (installed via USB or digital license), skip this step—the key will appear in the next step.
- 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:
-
Fetch the product key using
productkeycommand- Type:
slmgr /dli - 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).
- Type:
-
Use
slmgr /xprto verify installation type- Type:
slmgr /xprand pressEnter. - The output will show:
-
lic_type:K(Key) for retail,L(License) for OEM, orM(Mobile Device). -inst_type:1for retail,2for OEM. - If
lic_typeisL(OEM), you’ll need the hidden key from Step 3.
- Type:
If That Did Not Work
- Restart your PC and try
slmgr /dliagain—sometimes Windows caches incorrect responses. - If the key is missing entirely, your Windows may need reactivation. Use to reinstall if you have a valid key.
- 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. - 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
slmgrcommands 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_typeappropriate 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
slmgrfails, trydiskpart+wmicmethods (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
- No output from
slmgr /dli- Run
slmgr /upkto 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.
- Run
- Key appears wrong or repeated
- Use
slmgr /dliagain 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
- Use
- System says "Windows is not activated"
- Grab the key from
slmgr /dliorslmgr /xprand run:slmgr /ipk [key] - For OEMs, use the UUID method:
slmgr /upk+slmgr /ato(automatic setup).
- Grab the key from
- Commands return errors like "Error: 0x80070005"
- This means "Access Denied." Open CMD as Admin again.
- If permissions persist, check for antivirus firewall blocking CMD.
- 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+wmicto identify the original drive partition.
- Run
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.