I’m trying to sign a script but not having much luck. I’m using this to get the code signing portion of my certificate:
$sig = Get-ChildItem -path cert:/currentuser/my/ -codesigningcert
Set-AuthenticodeSignature -path C:/scripts/myscript.ps1 -certificate $sig
I receive an error when I run set-authenticodesignature indicating that $sig is null.
My environment uses Entrust PKI certificates.
Any suggestions would be appreciates.