Signed powershell script

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
byg
Posts: 1
Joined: Thu Aug 29, 2024 3:00 am

Signed powershell script

Post by byg »

Hello, we are using some powershell scripts for some tests, which work, but we have to allow running all remote unsigned scripts on the servers we run them on. And we see it as a big security breach, so we'd like to somehow sign the scripts with some certificate on the server. But I didn't find any way to do that from Host Monitor interface, do you have any suggestions how to go about doing that? So how to be able to run PS scripts but at the same time not sacrifice security?
Thank you, Josef.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Signed powershell script

Post by KS-Soft »

If you have certificate, you can sign your scripts using Get-ChildItem and Set-AuthenticodeSignature powershell commands
https://learn.microsoft.com/en-us/power ... rshell-7.4
E.g.

Code: Select all

$cert = Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
Set-AuthenticodeSignature scriptfilename.ps1 $cert
Then copy signed script into HostMonitor Script Manager window

Regards
Alex
Post Reply