Allsigned Execution Policy

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 1 week, 4 days ago.

  • Author
    Posts
  • #66192
    Profile photo of Brian Clanton
    Brian Clanton
    Participant

    To do more production level PS administration within my Company's hosted environment, we have required AllSigned Execution Policy from a central box. A GPO was created and I went through the steps of creating my Code Signing Cert and imported it into the GPO for allowed signing of my scripts.

    What seems cumbersome is that ever time I either run a new script or change my existing script, i have to create my new hash on the modified code...

    Set-AuthenticodeSignature c:\foo.ps1 @(Get-ChildItem cert:\CurrentUser\My -codesign)[0]

    Was wondering if there is an easier way to do this and what others do in their environments? My only thoughts on the matter are to modify my 'save' and/or 'run' execution commands to add this statement to modify my certs.

  • #66477
    Profile photo of Don Jones
    Don Jones
    Keymaster

    The only way to make this easier is to use a script editor that can do it for you automatically. PrimalScript, for example, has an option for this, I think.

You must be logged in to reply to this topic.