How to Check Your Windows Product Key Using Powershell and CMD

The Windows product key can be easily found using this short command


powershell get windows key

You can get your Windows activation key using PowerShell or CMD with just a quick command, no extra tools or installs needed. Whether you’re reinstalling Windows, switching devices, or backing up your license, this guide shows you the easiest ways to find your product key using built-in tools.

How do I use PowerShell to find the Windows key?

1. Use PowerShell to find product key

  1. Right-click on Start and click on Windows PowerShell (Admin).start powershell admin find windows product key in powershell
  2. In the PowerShell window, type powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"
  3. Press Enter. Your Windows product key will shortly appear.

2. How to find Windows product key using CMD

  1. In the Windows search box type cmd, right-click the result, and choose Run as administrator. If you can’t start Command Prompt as administrator, check out our guide on how to fix it.run as administrator cmd find windows product key
  2. In the cmd window, type wmic path softwarelicensingservice get OA3xOriginalProductKey
  3. Press Enter.
  4. Your Windows product key will show up. It’s in the form of XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.

As you can see, it’s pretty simple to get the Windows serial number with PowerShell. These aren’t the only methods, and we have a great guide on how to view your Windows 11 product key that shows you even more ways to do it.

Keep in mind that issues with product keys can occur, and we wrote guides on what to do if the Windows product key not working or if the Product key can’t be used on this copy of Windows.

We also have a great article on how to find your serial number on Windows 11, so don’t miss it for more information.

If you have any other questions regarding the Windows product key, please leave them in the comments section below.

More about the topics: Windows 10 Guides

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

User forum

7 messages