Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sign PowerShell scripts (Windows)

First, check the code signing certificate(s) are present in the Personal Store:

gci cert:\CurrentUser\My -codesigning

To sign, run the following code block:

$acert =(dir Cert:\CurrentUser\My -CodeSigningCert)[0]
Set-AuthenticodeSignature .\FileName.ps1 -Certificate $acert -TimestampServer http://timestamp.comodoca.com/authenticode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.