In order to save resources I would like to know if it is possible to run a desktop shortcut (which just starts a PowerShell script) in the already open PS Console, rather than create a new instance. Whatever I put in the shortcut Start In box has no effect.
This is the Target I am using, which works but in a new process, albeit minimized as checked in the shortcut.
If you like to run the script you specified as the “target” of a shortcut on the desktop you can call it with the complete path of the script in the already open PS console.
‘d:\scripts\test.ps1’
There’s no way I know of to have the shortcut running the script in a proper way by double click AND inside of an open PS console.