Link to home
Start Free TrialLog in
Avatar of IT_Group1
IT_Group1Flag for Israel

asked on

Microsoft product key retrieval from our LAN

Hi,

We have ~100 Windows 2008 R2 servers, some of them STD ed, and some ENT.
I have to audit all the product keys in one excel file (since they're all OEM based).

I've tried Microsoft assessment and planning toolkit 7, with no success, and also Nirsoft's ProduKey, which seems to be limited to one server at a time (although having a LAN feature, which for some reason doesn't work).

Can anyone point me to a FREE tool which will assist us in this grim task?

Thanks
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

Key Finder (magicaljellybean.com) will do it if you have the Windows folder shared on each server.  You would still have to do it one server at a time, though.

Be warned that it may get blocked by AV software.  It is "safe", but the nature of what it is doing makes it suspect.
Avatar of IT_Group1

ASKER

Thanks.
No LAN scan for it ??
Key Finder (magicaljellybean.com) - isn't working on most of the Win 2k8 R2 servers, we're getting a serial similar to : BBBBBBB-BBBBBB-xxxxxxx

Any other ideas?

Thx
Check out:

http://www.intelliadmin.com/index.php/2012/08/get-your-windows-product-key-from-a-script/

The main thing is that the info that you need (albeit enrcypted) is in a specific registry value on each machine:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\\DigitalProductId

If you can harvest all the values remotely (Using Reg Query from command line) then you should be able to customise the vbs to convert a static file of entries.

Needless to say there's a bit of work in this, hopefully someone else will be able to suggest a ready-made solution.
getproductkey.txt
Someone suggested here before (sorry... I forgot about it) that certain types of MS licenses will show up as you described with Key Finder.  It was suggested that Volume Licensing has this issue, though I've got one server I support that seemed to contradict that.
Guys.
thanks for the suggestions.

Most of our lic's are OEM based (~90%).
SOLUTION
Avatar of Darr247
Darr247
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
powershell version

function Get-ProductKey {   
    $map="BCDFGHJKMPQRTVWXY2346789"
    $value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42] 
    $ProductKey = "" 
    for ($i = 24; $i -ge 0; $i--) {
      $r = 0
      for ($j = 14; $j -ge 0; $j--) {
        $r = ($r * 256) -bxor $value[$j]
        $value[$j] = [math]::Floor([double]($r/24))
        $r = $r % 24
      }
      $ProductKey = $map[$r] + $ProductKey
      if (($i % 5) -eq 0 -and $i -ne 0) {
        $ProductKey = "-" + $ProductKey
      }
    }
    $ProductKey
} 

Open in new window

Thanks a lot!

Apparently some of our keys are MAK based, and both recommended utils couldn't resolve them properly (shows only the last 5 digits).

Why it has to be so complicated ?? Can't a man audit his network in peace?

Any other suggestions guys?

Thanks in advance
VAMT will audit the MAK/Volume managed keys for you. If they are as you say 'oem based' then they are not using mak/volume keys but Oem keys.
What's VAMT ?
Nothing helped with the MAK keys.
Thanks for the effort !
VAMT -- volume activation and management tool.
http://technet.microsoft.com/en-us/library/ff686876.aspx