0
使用makecert.exe
我可以採取PVK文件,並使用下面的命令生成一個CRL:如何在Powershell中生成CRL證書文件?
makecert.exe -crl -n 「CN = Foobar的」 -r -sv 「Foobar.pvk」「Foobar.crl 「
等效的Powershell命令是什麼?
下面的代碼使用PowerShell來生成PVK和CER文件,但我無法弄清楚如何生成CRL
$rootcert = New-SelfSignedCertificate -DnsName "CN=Foobar" -CertStoreLocation cert:\LocalMachine\My
$PFXPass = ConvertTo-SecureString -String "my password" -Force -AsPlainText
Export-PfxCertificate -Cert $('cert:\LocalMachine\My\' + $rootcert.Thumbprint) -Password $PFXPass -FilePath "Foobar.pvk"
Export-Certificate -Cert $('cert:\LocalMachine\My\' + $rootcert.Thumbprint) -FilePath "Foobar.cer"
我不認爲有產生或CRL簽名任何cmdlet的,我的建議是簡單地繼續使用'makecert.exe'或試圖制定出基本的API,並調用它通過PowerShell中 –
爲什麼你需要一個不同的命令? 'makecert.exe'在PowerShell中運行。 –