Finding correct Product key from WIndows 10 computers

Nick Perks
Nick Perks used Ask the Experts™
How do I find the right product key from Windows 10 computers.

I tried running nrisoft, Belrac and magic jelly bean and looks like they are pulling same product key on all 5 laptops in our company. How is that possible ?  Is it because may be these computers were upgraded to Windows 10 at some point from Windows 8 and therefore showing the same key on all computers that I am trying to recover ?
These laptops were purchased from retail in the past 4 years so most likely had windows 8 on them.  

How can I find the OEM key that was shipped with the computer if there is physically no sticker on it. I have to fill out MS audit report and therefore its kind of important I find the right info.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
If they are running Windows 10, then the licensing is maintained in the Microsoft Licensing Server. So you do not need the original key.
Chirag NagrekarAssociate - Sys Admin

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion


Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Cur = 0
x = 14
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

Open in new window

Save above commands as productkey.vbs and run on all 5 computers and check if they are returning same key ?
Andrew LeniartIT Professional | Freelance Journalist | Looking for Opportunities
Distinguished Expert 2018


Did you test that script you posted?  I just tried it here and got the following?

Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Chirag NagrekarAssociate - Sys Admin

Yes Andrew,

It is working for me.

Andrew LeniartIT Professional | Freelance Journalist | Looking for Opportunities
Distinguished Expert 2018

Strange Chirag. I just re-copied and pasted your code exactly and saved it as a .vbs file on my desktop. Still the same error.
Most Valuable Expert 2013
# pull the hex value from motherboard and outputs it to $hexdata
$HexData = .\oa3tool.exe /validate

# Find the hex value that contains the product key and formats/trims it for conversion.
$HexData = $HexData | select -First 33 | select -Last 4
$HexData = $HexData -replace '\s+', ' '
$HexData = $HexData.trimstart(' ')
$HexData = $HexData.trimend(' ')

# Split hex values into objects and convert them to decimal, then decimal to ASCII, 
# then set the new value as $prodkey.
$HexData.split(" ") | FOREACH {[CHAR][BYTE]([CONVERT]::toint16($_,16))} | Set-Variable -name prodkey -PassThru

# join the ascii array into a string
$prodkey = $prodkey -join ''
# regex replace all unprintable characters.
$prodkey = $prodkey -replace "[^ -x7e]",""

write-host success!

# display result
echo "Embedded Product Key : $prodkey" 

Open in new window

in Powershell

@Chirag your code as posted here doesn't work as there's a blank line at #3 which has crept in as part of the cut & paste. However it doesn't really help as it gets the DigitalProductId value from the registry and decrypts it.  Nick is already getting that from the keyfinders he's using.

Since Windows 8 OEM activation of operating systems has used a hardware embedded key injected into the system BIOS.  The same system is used in Windows 10 but additionally, since build 1511, a digital license (called "digital entitlement" in Windows 10) which is a method of activation in Windows 10 that doesn't require you to enter a product key has been used. If you upgraded to Windows 10 for free from an activated copy of Windows 7 or Windows 8.1, you should have a digital license instead of a product key.

Because the system Registry has a legacy location at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId that needs to be populated when Windows is activated, commonly a "placeholder" key  is inserted at activation and this is identical (certainly between system builders).  This is the value Nick is retrieving.

If the machines still have an OEM install then use the Powershell script above.  If you've re-imaged them then you should be using VAMT for your audit evidence.

I wrote the following when embedded keys were introduced in Windows 8, this is still true of embedded keys in Windows 10 although digital activation status will eventually replace this.
Andrew LeniartIT Professional | Freelance Journalist | Looking for Opportunities
Distinguished Expert 2018

Great article MASQ. Thumbs up!
Chirag NagrekarAssociate - Sys Admin

Thanks MASQ.. Great explanation about OEM.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial