SuperflyJon / FileStarter

Start processes on multiple desktops
54 stars 9 forks source link

Digitally Signed #2

Closed Gazareth closed 4 years ago

Gazareth commented 4 years ago

Hi thank you for your reply to the other issue, which I hope to get back to. I think there is another more pressing issue though which I should have spotted before.

It is saying:

... VirtualDesktop.ps1 is not digitally signed. You
cannot run this script on the current system. For more information about running scripts and setting execution policy,
see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Hope you can help me with this. I've never run powershell scripts before.

SuperflyJon commented 4 years ago

I've self-signed the script files, so this may now work for you. I say may as it depends on your security settings. If it still doesn't work, open powershell and type: Get-ExecutionPolicy

If this is too restritive, something like Set-ExecutionPolicy -Scope CurrentUser RemoteSigned will get it working.

Gazareth commented 4 years ago

For posterity, the execution policy was already set to RemoteSigned, but this does not accept a digital signature from a non-trusted source. Execution policies.

It does mention however that you can call the Unblock-File command if you want to permit specific scripts, which I have done in this case, and it seems to be working fine. "Unblock-File".

SuperflyJon commented 4 years ago

Yes, you're right. I've added the certificate to the repository (sign.cer), installing that to the "Trusted Root Certificate Authorities" should work as well.

SuperflyJon commented 3 years ago

I used a self-signed certificate which won't work on remote machines, so I've removed that now. The unblock-file command should work (whatever the execution policy).