Last active
September 24, 2015 13:29
-
-
Save jespernohr/b46fef2c92ddd003721a to your computer and use it in GitHub Desktop.
sign powershell scripts using a code signing ssl certificate.
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
# use commands to sign powershell scripts using a code signing ssl certificate. | |
# prerequsits: | |
# 1. Self-signed, 3rd party or Active Directory Certificate Services codesigning certificate installed. | |
# 2. client computers or client servers should trust the publisher/auther (user) used signed the script. | |
# sets Windows execution policy to secure. | |
Set-ExecutionPolicy AllSigned | |
# sign the script with the "Code Signing" certificate in Certificate - Current User - Personal - Certificates store. | |
Set-AuthenticodeSignature C:\Set-Static-IP.ps1 @(Get-ChildItem cert:\CurrentUser\My -CodeSigningCert)[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment