Back in the old days of optical discs, Windows XP, and the beige PC cases, it’s just easy to retrieve or re-use your Windows Product Key. You just have to either look at your Windows CD/DVD or at the Certificate of Authenticity Sticker located on your PC’s case or notebook. Fast forward today, Microsoft isn’t all that generous to add your Windows Product key anymore on any stickers, especially if we’re talking about OEMs or simply manufacturers who bundled any recently released Windows OS for you to freely use. Surely, back in the days, it’s easier said and easier done.
There are many reasons why you wanted to see your Windows Product Key. Maybe you lost it and just wants to freshly format your PC then get rid of the viruses or troubles for good. Maybe you are transferring to a newly built Gaming PC, but you love your OS anyway and has no spare penny to buy a new one, or simply you just want to see what’s rightfully yours. Either way, as many reason there is, there are many ways to reveal the Windows Product Key yourself and we’re going to check easy methods to reveal them. Most of these methods have been tested with Windows 7 and they do work.
Note: One must know that your Product Key might be located on your notebook or PC’s UEFI / BIOS firmware. Thus, it might be displayed differently to your Product ID. Your Product ID isn’t exactly your Product Key by the way, and finding the Product Key is the best as it is what you will need in an event of re-installation.
Command Prompt Method: Windows 7, 8.1 and Windows 10
Probably the easiest, the Command Prompt method should be the first thing to do to check your key. To do so, open up the CMD via any means, or just press “Windows Key + R” and type “CMD”. Once inside, just input the code below:
wmic os get "SerialNumber"
To paste the code to CMD, just copy the text above and click the right mouse button on the CMD’s UI, then click paste. Just press the Enter / Return Key afterwards to see the result.
Windows Key Retrieval Via PowerShell: Windows 8, 8.1 and Windows 10
As the name suggests, The Windows PowerShell is actually a very, very powerful tool at anyone’s disposal – which is a task automation management framework that could be used to “do” administrative tasks generally performed via cmdlets. In layman’s term, it’s the IT Administrator’s weapon of choice to automate tasks in a command line fashion, similar to CMD but is way more powerful. We have included Two sub methods for “this” method of showing the product key, as Windows 7’s method differs from the latest versions of Windows and is a bit more tricky albeit it should be easy enough if you have the aptitude.
For Windows 8, 8.1 & 10, Tis’ a fairly easy matter to do. Just open up Window’s PowerShell as an administrator, via the search bar on your Windows OS > right-click its icon, and press “Run As Administrator” or equivalent.
On the PowerShell’s UI, copy the command below, or paste it via copying the command, and then right clicking anywhere on the PowerShell UI.
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
After that, press the Enter/Return key to check out your Product Key. It shouldn’t be hard.
Windows Key Retrieval Via PowerShell: Windows 7 Only
For Windows 7, things are going to be a bit trickier albeit still easy enough for anyone to do if you prefer the PowerShell way. First, you need to copy the query below:
function Get-WindowsKey { ## function to retrieve the Windows Product Key from any PC ## by Jakob Bindslet ([email protected]) param ($targets = ".") $hklm = 2147483650 $regPath = "Software\Microsoft\Windows NT\CurrentVersion" $regValue = "DigitalProductId" Foreach ($target in $targets) { $productKey = $null $win32os = $null $wmi = [WMIClass]"\\$target\root\default:stdRegProv" $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue) $binArray = ($data.uValue)[52..66] $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9" ## decrypt base24 encoded binary data For ($i = 24; $i -ge 0; $i--) { $k = 0 For ($j = 14; $j -ge 0; $j--) { $k = $k * 256 -bxor $binArray[$j] $binArray[$j] = [math]::truncate($k / 24) $k = $k % 24 } $productKey = $charsArray[$k] + $productKey If (($i % 5 -eq 0) -and ($i -ne 0)) { $productKey = "-" + $productKey } } $win32os = Get-WmiObject Win32_OperatingSystem -computer $target $obj = New-Object Object $obj | Add-Member Noteproperty Computer -value $target $obj | Add-Member Noteproperty Caption -value $win32os.Caption $obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture $obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber $obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser $obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber $obj | Add-Member Noteproperty ProductKey -value $productkey $obj } }
After copying, open notepad > paste the query > and then save it as a .ps1 extension file. Let’s say save it as “Windows7Key.ps1” at the desktop. After that, run the PowerShell console as an administrator, then input the following command:
Set-ExecutionPolicy RemoteSigned
After pressing Enter / Return, and confirming by pressing “Y” (Yes) to commence, issue the command below. Note that you should change “USERNAME” to your username and the “Windows7Key.ps1” to the name of .ps1 file of your liking.
Import-Module C:\Users\USERNAME\Desktop\Windows7Key.ps1; Get-WindowsKey
And now we have our Windows Product Key displayed. Very nice.
Download a Third Party Software
Now if you don’t feel doing those things, there’s always a software to back you up. The Magical Jelly Bean is an easy to use key finder to check out your Windows OS’ product key, and it could also retrieve 300 more keys from other popular programs too. I use this sparingly, whenever I need to reformat for science purposes. Just follow the instructions from the link and the installation procedures to get started. Just make sure to un-check the “Razor Web” extension add-on so you wont install it accidentally. It sucks, and is a potential adware.
So there you have it. Easy right? Just remember that Microsoft started on their licensing terms that the OEM key and Retail key differs. Both might be the same, but the terms of usage differs even though you’ve found your key. For example, the OEM based key provided is intended to be used on the PC or notebook you received your copy of Windows with so legally, you can’t use it on other PCs. For the retail version, it’s all up to you.
PS script doesnt give the right KEY (i know my original key + jelly bin shows the right key), guess there is a problem with the decode
2.5
4.5
1.5
5
where to buy a genuine windows 7 ultimate key
Hard to look for genuine Windows 7 keys now a days. Best look for eBay I guess.
When you use a Windows 7 product key for 32 bit/64 bit, you are on your own. There is no official Microsoft support for Windows 7.
till next year there is! if you dont know FACTS dont post it!
alternatively you can use keygetter
I just cant tell you how thankful I am for the wmic os get “SerialNumber” cmd it was a saver this never popped in my head, I’ve been doing the wmic path SoftwareLicensingService get OA3xOriginalProductKey, finally a sys restore w/o a headache.. :)
Thank you so much. Running win 7 virtual guest in VirtualBox on Mac x is a little buggy. Running cmd.exe isn’t always reliable. I completely forgot about PowerShell. Ran like a charm. :)