Theres是一個在powershell中調用New-SelfSignedCertificate
的工具,我們可以爲CA
建立自簽名證書。 但我只是無法弄清楚是否可以創建由New-SelfSignedCertificate
此前創建的證書頒發/簽名的子證書。其實我可以用makecert.exe
做到這一點,但我想在powershell
中編寫它。PowerShell是否有創建非自簽名證書的工具?
例如,在makecert.exe
,我執行以下命令:
1)Creating the CA cert: **makecert.exe** -sk RootCA -sky signature -pe -n CN=ca.com -r -sr LocalMachine -ss Root RootCA
2)Creating another cert for server signed by above CA: **makecert.exe** -sk server -sky exchange -pe -n CN=server.com -ir LocalMachine -is Root -ic RootCA -sr LocalMachine -ss My server.com
在PowerShell中我只知道創建CA,使用命令:
New-SelfSignedCertificate -DnsName "ca.com" -CertStoreLocation cert:Localmachine/My
但是,如何創造上面簽名的另一個證書?
其他的事情,當我試圖把-CertStoreLocation = cert:Localmachine/**Root**
我得到一個錯誤信息說我只能在我的店創建證書(我已經以管理員身份運行)
感謝。