I have to sign remote scripts with a certificate from the remote machine from which I have a
I would like to automate the scripting by supplying the password to the
So the question is:
Is it possible to somehow supply programmatically the required password to
$CertPath = "my.pfx"
$CertPass = "mypw"
$Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath, $CertPass)
Set-AuthenticodeSignature -Certificate $Cert -TimeStampServer http://timestamp.verisign.com/scripts/timstamp.dll -FilePath $OutputFilename
Make sure you have the proper permissions otherwise you won’t be able to create an instance of the X509Certificate2 object.