Forum Discussion

h3rb3rt's avatar
h3rb3rt
Copper Contributor
Dec 16, 2021

PowerShell Export-PfxCertificate Problem

Hello Community,   i have the following problem:   When i export my root-Certificate as cer with PowerShell and with certmgr i get completly the same content in my files.   BUT   My child-pfx...
  • AndresGorzelany's avatar
    AndresGorzelany
    Dec 17, 2021
    Hello, how are you?

    How many certificates "Get-ChildItem -Path $systemcertpath" is outputting? it seems it is probably more than one certificate there, but you need only one, right?

    I used this and I got the same certificate size both with mmc and Ps

    Get-ChildItem -Path cert:\LocalMachine\my\327911063683D218873824A150B695F3875F8A38 | Export-PfxCert
    ificate -NoProperties -ChainOption EndEntityCertOnly -Password $mypwd -FilePath C:\Users\Desktop\qaz321.pfx

Resources