How to Digitally sign a Powershell Module

Welcome Forums General PowerShell Q&A How to Digitally sign a Powershell Module

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
3 years, 5 months ago.

  • Author
    Posts
  • #24875

    Participant
    Points: 0
    Rank: Member

    How do you digitally sign a powershell module? I have written a number of modules that I now want to deploy. The target machines that I want to deploy to all have the execution policy AllSigned. It is not an option to change this. I have dabbled with digitally signing scripts before but how do I sing a module? Is it just a question of signing each file in the module directory? I have been using this post to help me understand signing scripts but it does not mention modules. http://www.darkoperator.com/blog/2013/3/5/powershell-basics-execution-policy-part-1.html

  • #24876

    Keymaster
    Points: 1
    Rank: Member

    Read help_about_signing, and the command you're after is set-authenticodesignature. Script modules get signed like any other script.

  • #24894

    Participant
    Points: 0
    Rank: Member

    Stephen

    Just to add to what Don said, you will sign the scripts in the module, not the module itself. Of course, a module can be only one script, but the idea is signing each file.

The topic ‘How to Digitally sign a Powershell Module’ is closed to new replies.