Running powershell script with elgato streamdeck

Hello, I have been able to get a powershell script to run with the streamdeck using `powershell -file "myfile"`. However, i am getting this error "powershell running scripts is disabled on this system". I have set the permissions to `remotesigned` and it is still giving me the issue. I have also restarted the computer to no avail.

Anyone have an idea on how i can execute the script without error?

Or is there a way to run different types of scripts using the elgato stream deck? I don't care what kind of script it is, i just need to be able to run a script with me elgato.

Posted Oct 9, 2018, 1:52 PM UTC

44
BarelyInfected0•

Try this: powershell -ExecutionPolicy ByPass -File script.ps1

4
prolink007OP•

Worked!! Thank you very much!

2
BarelyInfected0•

No problem!

1
stevey500•

Insanely helpful. We have PTZ cameras throughout and this helped me invoke http ptz position requests via view shortcuts on the streamdeck. Powershell pops up momentarily though, that can be annoying. Looks like this is the solution: https://github.com/PowerShell/PowerShell/issues/3028

1
BarelyInfected0•

Glad it works for you. I tried using that "-WindowStyle Hidden" before and it seems to shorten the time the window pops up but it doesn't remove it completely. I've read that you can for example launch your powershell script within a vbs file but I haven't tried that yet. It doesn't bother me too much but I'm gonna fix that at some point. :)

1
MicFury•

TIL I can run PS scripts via SD. I love this thing!

2