Join a Certificate and Private Key and export to a PFX file.
[String]
Certificate The path to a certificate file. Mandatory, ValueFromPipeline[String]
PrivateKey The path to a PEM encoded private key file. Mandatory[String[]]
IntermediaryCertificate The patth to one or more Intermediary Certificates to include in the PFX bundle.[SecureString]
Password The password to protect the PFX file.[Switch]
PassThru Optionally send the X509Certificate2 object to the pipeline.
Join CA signed certificate with issuing private key and export to a PFX file.
Join-CertificateWithKey -Certificate .\mynew.cer -PrivateKey .\mynew.key -Password (Get-Credential).Password
The PFX file will be saved to the same directory as $Certificate
.