Finding correct Product key from WIndows 10 computers

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.

Nick PerksIT DirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
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 NagrekarSystem AnalystCommented:
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 Consultant & Freelance JournalistCommented:

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

10 Holiday Gifts Perfect for Your Favorite Geeks

Still have some holiday shopping to do for the geeks in your life? While toys, clothing, games, and gift cards are still viable options for your friends and family, there’s more reason than ever to consider gadgets and software.

Chirag NagrekarSystem AnalystCommented:
Yes Andrew,

It is working for me.

Andrew LeniartIT Consultant & Freelance JournalistCommented:
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.
☠ MASQ ☠Commented:
# 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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew LeniartIT Consultant & Freelance JournalistCommented:
Great article MASQ. Thumbs up!
Chirag NagrekarSystem AnalystCommented:
Thanks MASQ.. Great explanation about OEM.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.