I want to execute a powershell script (ps1-file) with a hotkey on my keyboard (CTRL + SHIFT + F for instance).
I managed to create a shortcut of the script (right click in explorer > new > shortcut). The shortcut's target is: "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "PATH_TO_THE_SCRIPT" ".
When I execute the script manually (by double-clicking the shortcut), it works like a charm. But when I try to assign a "Shortcut key" in the Shortcut Properties (CTRL + SHIFT + F) and press the shortcut key I just defined, nothing happens. What's the matter?
I'm quite sure it has something to do with security policies. But I don't know what exactly it is.
This is my Execution-Policy:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process RemoteSigned
CurrentUser Unrestricted
LocalMachine Unrestricted
Any help is appreciated.
calc
as a target of the shortcut. – wOxxOm