This shows you the differences between two versions of the page.
| |
qnd:sign_powershell_script [2021/03/10 20:08] – created mgupton | qnd:sign_powershell_script [2021/03/10 20:08] (current) – mgupton |
---|
====== Sign Powershell Script ====== | ====== Sign Powershell Script ====== |
| |
| * [[https://community.spiceworks.com/how_to/153255-windows-10-signing-a-powershell-script-with-a-self-signed-certificate |
| ]] |
| |
<code> | <code> |
| |
New-SelfSignedCertificate | New-SelfSignedCertificate |
| |
https://community.spiceworks.com/how_to/153255-windows-10-signing-a-powershell-script-with-a-self-signed-certificate | |
| |
PS C:\tmp\Azure> New-SelfSignedCertificate -CertStoreLocation cert:\currentuser\my -Subject "CN=Local Code Signing" -KeyAlgorithm RSA -KeyLength 2048 -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -KeyExportPolicy Exportable -KeyUsage DigitalSignature ` -Type CodeSigningCert | PS C:\tmp\Azure> New-SelfSignedCertificate -CertStoreLocation cert:\currentuser\my -Subject "CN=Local Code Signing" -KeyAlgorithm RSA -KeyLength 2048 -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -KeyExportPolicy Exportable -KeyUsage DigitalSignature ` -Type CodeSigningCert |