How to Get Windows Key from CMD: A Step-by-Step Guide

Command-line tools can sometimes show an OEM Windows product key stored in a PC’s UEFI firmware, but many activated Windows systems use a digital license instead. A blank result does not necessarily mean the computer lacks a legitimate Windows license.

Check activation before searching for a key

  1. Open Settings > System > Activation in Windows 11, or the equivalent Activation page for your Windows version.
  2. Confirm whether Windows reports that it is activated and note the installed edition.
  3. Open an authorized command shell or PowerShell session.
  4. Use the supported Windows management method available on your build to query the firmware-embedded OEM product key.
  5. If no key is returned, do not assume activation is broken; the device may use a digital license.
  6. Keep any product key you recover private.

Old WMIC examples may no longer work

Many older tutorials use wmic path softwarelicensingservice get OA3xOriginalProductKey. WMIC has been deprecated and removed or disabled on newer Windows installations, so that command may be unavailable. PowerShell/CIM-based management methods are more appropriate on current systems.

A firmware key is not every key used by Windows

Retail upgrades, digital licenses, organization volume activation, and Microsoft account-linked activation can work without exposing a useful 25-character key through firmware. The key displayed by some utilities may also be a generic installation key rather than a unique transferable license.

Match the edition before reinstalling

Home and Pro licenses are not interchangeable. If Windows does not reactivate after a clean installation, verify that you installed the edition licensed for the device before buying another key.

Avoid unknown “key finder” downloads. Activation settings, purchase records, firmware information, and Microsoft support are safer sources for legitimate license recovery.

If you are documenting licenses for several organization-owned PCs, use the organization’s approved asset-management process rather than collecting keys in an unprotected spreadsheet. Product keys and activation records should be treated as administrative information.