Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bradbrowne/e171da9abaf5985f789ca11be58354c6 to your computer and use it in GitHub Desktop.
Save bradbrowne/e171da9abaf5985f789ca11be58354c6 to your computer and use it in GitHub Desktop.
Signing a Powershell script with Authenticode code signing certificate so that execution policy can be set to AllSigned
Set-ExecutionPolicy AllSigned
$cert = Get-PfxCertificate -FilePath "mapdojo.p12"
Set-AuthenticodeSignature -FilePath "build.ps1" -Certificate $cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment