Created
April 23, 2020 19:31
-
-
Save jmolinasoler/60372d5184087012aa6b6401a9e764cf to your computer and use it in GitHub Desktop.
Steps to sign the scripts in windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Type CodeSigningCert -Subject "jmolinaso Code Signing" | |
# Get-ChildItem -Path Cert:\CurrentUser\My | ? Subject -EQ "CN=jmolinaso Code Signing" | |
# Move-Item -Path (dir Cert:\CurrentUser\My).PSPath -Destination "Cert:\CurrentUser\Root" | |
# Set-AuthenticodeSignature -FilePath .\scriptToSign.ps1 -Certificate (dir Cert:\CurrentUser\Root -CodeSigningCert) -TimestampServer http://timestamp.globalsign.com/scripts/timstamp.dll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment