如题……问chatgpt和kimi都在胡说八道
AI不是可以给出正确答案吗?
# 获取签名信息并导出为 .cer 文件
(Get-AuthenticodeSignature [exe文件路径]).SignerCertificate | Export-Certificate -FilePath certificate.cer
# 查看证书详细信息
Get-PfxCertificate -FilePath certificate.cer | Format-List *
可以了,不过有的程序有多个数字签名,有sha1和sha256的
Export-Certificate只会导出第一个
而osslsigncode.exe extract-signature会全部导在一个证书文件里(如果想拆分的话,需要写脚本用openssl倒腾)