Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

New Post: Unable to convert pfx to pem

$
0
0
Hi,

I am trying to convert pfx to pem by using Convert-PfxToPem but I get the error below:
PS C:\Users\user\Desktop\CA> Convert-PfxToPem -InputFile C:\Users\user\Desktop\CA\test.pfx -Password (ConvertTo-SecureString 'test' -AsPlainText -Force) -OutputFile C:\Users\user\Desktop\CA\test.pem
Key not valid for use in specified state
At C:\Users\user\Documents\WindowsPowerShell\Modules\pspki\Client\Convert-PfxToPem.ps1:137 char:21
+             } else {throw New-Object ComponentModel.Win32Exception ([Runtime.Int ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], Win32Exception
    + FullyQualifiedErrorId : Key not valid for use in specified state
The private key is marked as exportable.

Thanks

Viewing all articles
Browse latest Browse all 729

Trending Articles