Search code examples
powershellcode-signing

Signing scripts - commit to source control or sign during deployment?


When creating a PowerShell module (or individual scripts, for that matter), if you must digitally sign them to comply with the defined ExecutionPolicy, should you commit the digitally signed files/scripts to source control? Or should signing the files/scripts be a step in the deployment process?


Solution

  • Signing should be a step in the deployment process. While signing during development is technically possible, you don't have any benefit from it, but add a bunch of lines of code to every commit.