Get & Check Your Windows Key With Powershell [How to]

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

Reading time icon 2 min. read


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

powershell get windows key

If you’re planning to reinstall Windows, you’ll need your activation key, and the fastest way to get the Windows key is with PowerShell. To see how to do that, keep on reading.

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

User forum

7 messages