3
我試圖將證書與PowerShell導出到pkcs12。我可以在MMC中導出它。但是PowerShell的barfs無法將windows證書導出爲pkcs12 - 「密鑰無法在指定狀態下使用」
PS C:\Users\paul> $cert.export('PFX'," pass")
Exception calling "Export" with "2" argument(s): "Key not valid for use in specified state.
"
At line:1 char:13
+ $cert.export <<<< ('PFX'," pass")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
私鑰可以導出
PS C:\Users\paul> $cert.privatekey.cspkeycontainerinfo
MachineKeyStore : True
ProviderName : Microsoft RSA SChannel Cryptographic Provider
ProviderType : 12
KeyContainerName : fd6ce48f23c5a94dee97bf7e87ef3da2_2868494a-a319-4976-80a7-e0f129e23cfd
UniqueKeyContainerName : fd6ce48f23c5a94dee97bf7e87ef3da2_2868494a-a319-4976-80a7-e0f129e23cfd
KeyNumber : Exchange
Exportable : True
HardwareDevice : False
Removable : False
Accessible : True
Protected : False
CryptoKeySecurity : System.Security.AccessControl.CryptoKeySecurity
RandomlyGenerated : False
運行的本地管理員
值由於一些未知的原因,這開始工作,當我清理東西展現出來,並再次啓動 - 軟件的奧祕! – pm100 2011-05-16 18:05:31