I already posted this on the MS forum but did not (yet) get any replies. Perhaps someone here knows what is going on.
I use a valid code signing certificate to sign various scripts, PS1, Infopath and such. … For powershell, this always worked like a charm, the policy is in place and the trusted publisher is also set up using domain policies. for the last 2 years , no problemos. I recently tried to upgrade our scripting server too powershell 3.0 since i like the new features but none of the signed scripts worked after that.
Error: Executable script code found in signature block
I don’t think the issue is the signature or the way it is signed, i feel that this is a bug or perhaps an issue on my side with code execution policies, even after using “drunken sailor mode” (Unrestricted) it spawned the error!
i use the following in an automated and semi-automated process.
$f = file
$cert=(dir cert:currentuser\my\ -CodeSigningCert)
Set-AuthenticodeSignature $f $cert -TimestampServer http://timestamp.comodoca.com/authenticode
Any help is appreciated !
ps: the semi-automated script only runs in PowerGui and the fully automated one runs in native PS.