故障描述
近期遇到很多笔记本通过SCCM安装完系统后,无法使用OEM许可激活。
过去我们只需要使用本地管理员权限的账户在激活页面点Troubleshoot即可解决,但现在该方法失效、
大概错误内容为We can't activate Windows on this device as we can't connect to your organization's activation server. Error code 0x8007232B.
解决方法
1.以管理员身份运行Powershell并执行
wmic path SoftwareLicensingService get OA3xOriginalProductKey

2.点击更改产品秘钥,并将上面获取的Key输入后激活。
优化
秉着能不动手就不动手的原则,写个Powershell脚本来完成这些操作
# // Get product key
$Key = (Get-WmiObject SoftwareLicensingService).OA3xOriginalProductKey
If ($Key) {
Write-Host -ForegroundColor Green "Installing product key"
Invoke-Command -ScriptBlock {& 'cscript.exe' "$env:windir\system32\slmgr.vbs" '/ipk' "$($Key)"}
Start-Sleep -Seconds 5
Write-Host -ForegroundColor Green "Activating product key"
Invoke-Command -ScriptBlock {& 'cscript.exe' "$env:windir\system32\slmgr.vbs" '/ato'}
Start-Sleep -Seconds 5
}
Else {
Write-Host -ForegroundColor Red 'No product key found.'
}
再将该脚本添加至SCCM系统部署的Task里,在部署系统后自动完成激活
Enjoy :smile:
