How to find the Product Key on any version of Windows

How would you re-install Windows if you needed to this very moment?

I’ve already showed you how to legally download Windows 8 for free.  In fact, I showed you how to legally download every version of Windows for free, but what happens after you save the ISO to a DVD or USB drive?

When you reinstall the OS which product key are you going to use if you lost it?

Just use ProduKey right?

Some people attempt to use programs like NirSoft’s ProduKey to pull the Product ID from the registry but are dissuaded by their antivirus reports.

And although it’s a false positive; it’s scary enough to put some people’s quest for their product key in abeyance.

NirSoft ProduKey is Malware?

Furthermore, sometimes Microsoft won’t even let you use the key Nirsoft retrieves so this isn’t a reliable method.

Belarc Advisor is better

Most people run Belarc Advisor prior to re-installing or wiping a hard drive because it lists all your important product keys (Windows, Office, Adobe) and shows you all your important settings before you wipe.

Belarc Advisor showing you everything you need to know about your Windows OS

For example, you’ll see the following detailed report in your browser:

  • The PC serial number so you can download all the drivers again
  • Any connected network drives
  • Printers
  • Virus Protection Software
  • Installed Hotfixes
  • Software Licenses (press Ctrl + f and search for “software licenses”)
  • Software you haven’t used for a long time so you can free up your licenses

Just use Powershell

That’s great but you don’t need Belarc or NirSoft to view your licenses.  All you need is a handy little PowerShell script created by Boe Prox called  Get-ProductKey.ps1.

It works on every versions of Windows (XP, Vista, 7, 8, 8.1) and is an lightweight, ultra-fast solution to finding your Windows product key.

Go to The Microsoft Technet Script Center and download Get-ProductKey.ps1.

Get-ProductKey.ps1Now, bust open PowerShell as an Administrator:

  • Press Windows Key + q
  • Type Powershell
  • Right click the result and choose Open as an Administrator from the context menu.

The first thing we need to do is temporarily change the script execution policy to Unrestricted.

Set-ExecutionPolicy Unrestricted

Please keep in mind that you should never leave the ExecutionPolicy set to Unrestricted because it means any PowerShell script can run (the good and the bad ones).  That’s why it’s probably prudent to change the execution policy back to Restricted after you run the script.

Set-Execution Policy Unrestricted

Alright, now we can change to the directory that contains Get-ProductKey.ps1 and run the script:

. .\Get-ProductKey.ps1

Press r to run once and get the hostname of your PC


Finally run the Get-ProductKey -Comuptername command to view your product key:

Get-ProductKey -Computername myComputerHostname;

The product key will show up in the right most column.

Viewing the product key of Windows in PowerShell

That’s all there is to it!  Let me know if you encountered any problems.


Connect with Vonnie on Twitter

Posted in Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Vista, Windows XP Tagged with: , ,
  • Francesco Rizzo

    my computer was originally bought with windows 8 home edition (lenovo ideapad Z500).
    Few days after I bought it, I installed windows 7, completely removing windows 8.
    Now, I would like to figure out how to find my original product key for windows 8.
    If I try to use powershell I obtain no result.
    If I use other tools, I obtain a product key, but I think is windows 7 product key.

    What’s wrong?


  • Non Linear

    did not work… I have no results (windows 7)