Skip to content

Instantly share code, notes, and snippets.

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 potatoqualitee/b84c650eeb88dddb924254c7e173e443 to your computer and use it in GitHub Desktop.
Save potatoqualitee/b84c650eeb88dddb924254c7e173e443 to your computer and use it in GitHub Desktop.
sign
$base64 = [convert]::ToBase64String(([IO.File]::ReadAllBytes("C:\temp\cert.pfx")))
$buffer = [System.Convert]::FromBase64String($base64, $securestring)
$certificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($buffer)
Set-AuthenticodeSignature -FilePath $filePath1 -Certificate $certificate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment