Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A script to load certificates for windows builds
[Parameter(Mandatory=$True, Position=0, ValueFromPipeline=$false)]
[Parameter(Mandatory=$True, Position=1, ValueFromPipeline=$false)]
$Cert = Import-PfxCertificate -FilePath $KeyPath -Password (ConvertTo-SecureString -String "$KeyPass" -AsPlainText -Force) -CertStoreLocation Cert:\LocalMachine\My
Export-Certificate -Cert $Cert -File c:\Cert.sst -Type SST
Import-Certificate -File c:\cert.sst -CertStoreLocation Cert:\LocalMachine\Root
Import-Certificate -File c:\cert.sst -CertStoreLocation Cert:\CurrentUser\My
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment