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)
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.
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.