Hi,
I am trying to convert pfx to pem by using Convert-PfxToPem but I get the error below:
Thanks
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