# 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
# path to folder to create a catalog file for # (make sure it exists and isn't too large) $path = "$Home\Desktop" # path to catalog file to be created $catPath = "$env:temp\myDesktop.cat" # create catalog New-FileCatalog-Path$path-CatalogVersion2.0-CatalogFilePath$catPath