Note: This script uses the New-SelfSignedCertificate cmdlet, which is only available in Windows 10 / Server 2016 and newer. The cmdlet itself is present in older versions, but it does not have the same functionality.
Usage:
New-CodeSigningCert -Subject "Tyler Applebaum Code Signing Cert" -EMail "e@mmail.com" -PFXPassword "1234" -FriendlyName "PSCodeSigningTest" -CertValidYears 5Usage:
Tab complete the -CertFriendlyName parameter to list all code signing certificates in your user store.
Import-Module Invoke-BinarySignature.psm1 New-BinarySignature -CertFriendlyName "PSCodeSigningTest" -BinPath "C:\Temp\Test-Signed.ps1"