PowerShell Script digitally signed error


I’m getting an error when I run a PowerShell script:

File test_new.ps1 cannot be loaded. The file test_new.ps1 is not digitally signed.

I created a CA and a certificate and signed this file using the procedure described here.

Here is when I do a dir on the MY directory:

I can see the signature block appended at the end of the test_new.ps1 file.

Here is the execution policy and scope:

The machinepolicy should take priority which is set as AllSigned. Everything seems allright, why am I still getting the digitally signed error.


Finally found a solution to this:

It had to be published in the TrustedPublisher store for it to work.


PowerShell Script digitally signed error by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply