作者:电脑信息网日期:
返回目录:win7问题
如果你的电脑是OEM激活的,可以用以下Powershell命令查7a64e58685e5aeb9332看:
Get-WmiObject SoftwareLicensingService | FL OA3xOriginalProductKey
如果非OEM的,不能直接查看,但网上有工具可用,也有Powershell脚本,比如以下脚本:
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
}
在Powershell里定义上述函数后,再输入Get-ProductKey回车执行即可。