A product key is a unique alpha-numeric code that verifies you are running an original copy of Windows. That being said, you seldom need the product key to your copy of Windows as the OS is usually preinstalled.

However, in an event where you have to reinstall the OS from scratch, you might be required to enter it. Thankfully, you can easily find your Windows 11 product key using Command Prompt. Moreover, for your ease of convenience, we will also showcase the process using Powershell as well.

Find your Windows 11 Product Key Using the Terminal

To find your product key using Command Prompt, head to the Start Menu and type Terminal. Then, from the search results, right-click on the 'Terminal' tile and click the 'Run as administrator' option.

A UAC (User Account Control) window will appear on your screen. If you are not logged in with an admin account, enter the credentials for it. Otherwise, click on 'Yes' to proceed.

Now, click 'Chevron' (downwards arrow) and select the 'Command Prompt' option. It will open in a new tab.

Finally, type or copy+paste the below-mentioned code and hit Enter to execute the command.

wmic path SoftwareLicensingService get OA3xOriginalProductKey

Once successfully executed, you shall see your product key on the screen.

You can also find your product key using Powershell. To do so, shift to the 'Powershell' tab and type or copy+paste the below-mentioned code and hit Enter to execute it.

powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"

You will now be able to see your product key on the screen.


Knowing your Windows Product Key can be very helpful when you have to install the OS fresh, and this guide will help you do exactly that using both Command Prompt and PowerShell.