Thank you for you're reply, Meinolf, but as I said i don't want to use third part software.
Can I know the reason why Microsoft hides this information? I can understand they want to counter piracy, but hiding you're license key which you paid a pretty penny for, forcing to use third party software and thereby exposing you're machines...
where is the sense in that ?
I found this script which i'l running in PowerShell but sadly the keys don't correspond to the OEM stickers.
# create table to convert in base 24
$map="BCDFGHJKMPQRTVWXY2346789"
# Read registry Key
$value = (get-itemproperty "HKLM:\\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42]
# Convert in Hexa to show you the Raw Key
$hexa = ""
$value | foreach {
$hexa = $_.ToString("X2") + $hexa
}
"Raw Key Big Endian: $hexa"
# find the Product Key
$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
}
}
"Product Key: $ProductKey"
Could anyone confirm that this thing shows the correct information or maybe point me in the right direction for another script?
Thanks in advance, the audit is comming up, my boss is panicking :p