Skip to content

Instantly share code, notes, and snippets.

@macna
Created July 7, 2015 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macna/59f1dabce07279471f39 to your computer and use it in GitHub Desktop.
Save macna/59f1dabce07279471f39 to your computer and use it in GitHub Desktop.
PowerShell script for signing a PowerShell script. Requires that you have a certificate in your personal store that is suitable for code signing
$cert = @(gci cert:\currentuser\my
-codesigning)[0]
Set-AuthenticodeSignature myscript.ps1 $cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment