参考
https://blog.csdn.net/AndyXia/article/details/75071388
https://msfn.org/board/topic/181915-system-certificates-updater-the-easy-way/
执行下面的powershell代码更新证书,说白了就是更新获取一份最新的根证书,然后再导入到报0x800b010a的机器,不一定用下面的代码,手动下载、手动导入也行
$client = new-object System.Net.WebClient
$client.DownloadFile('http://windows-1251783334.cos.ap-shanghai.myqcloud.com/115.159.148.149/wget64.exe',' c:\windows\wget.exe')
#del C:\WURoots.sst 2>&1 > $null
del C:\authroots.sst 2>&1 > $null
del C:\roots.sst 2>&1 > $null
del C:\updroots.sst 2>&1 > $null
wget.exe http://windowscq-1251783334.cos.ap-chongqing.myqcloud.com/updroots.exe -O c:\windows\updroots.exe 2>&1 > $null
while(((Test-Path c:\authroots.sst) -eq $false) -or ((Test-Path c:\roots.sst) -eq $false) -or ((Test-Path c:\updroots.sst) -eq $false)){
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authroots.sst -O c:\authroots.sst 2>&1 > $null
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/roots.sst -O c:\roots.sst 2>&1 > $null
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/updroots.sst -O c:\updroots.sst 2>&1 > $null
}
$Certs = get-childitem Cert:\LocalMachine\Root
if((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName -match "2008 R2|Windows 7"){
#wget.exe http://windowscq-1251783334.cos.ap-chongqing.myqcloud.com/WURoots.sst -O c:\WURoots.sst 2>&1 > $null
$Certs| ForEach-Object {
$store = Get-Item $_.PSParentPath
$store.Open('ReadWrite')
$store.Remove($_)
$store.Close()
}
}else{
#while( (Test-Path C:\WURoots.sst) -eq $false ){
#certutil -generateSSTFromWU C:\WURoots.sst 2>&1 > $null
#}
$Certs | %{Remove-Item -path $_.PSPath -recurse -Force}
}
#[UpdRoots -open SrcStore failed=>0x2(2)], replace with https://msfn.org/board/topic/181915-system-certificates-updater-the-easy-way/
#updroots.exe c:\WURoots.sst
start-sleep -s 5
updroots c:\authroots.sst
start-sleep -s 5
updroots c:\roots.sst
start-sleep -s 5
updroots c:\updroots.sst
start-sleep -s 5
#certmgr.msc
#del C:\WURoots.sst 2>&1 > $null
del C:\authroots.sst 2>&1 > $null
del C:\roots.sst 2>&1 > $null
del C:\updroots.sst 2>&1 > $null
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有