# this password is required to be able to load and use the certificate later $Password = Read-Host-Prompt'Enter Password'-AsSecureString # certificate will be exported to this file $Path = "$Home\Desktop\myCert.pfx"
# certificate must be in your personal certificate store $cert = Get-ChildItem-Path Cert:\CurrentUser\My -CodeSigningCert | Out-GridView-Title'Select Certificate'-OutputMode Single $cert | Export-PfxCertificate-Password$Password-FilePath$Path