I tried searching for this, but only came across people who were missing quotations around their path, when they wanted to run a PowerShell .ps1 file. However, this is not my problem. I have the following folder structure:
As you can see, there is a folder called
project folder. Because of that, when I double click a .ps1 file in Windows file explorer, it will open PowerShell but immediately close again. No output or anything.
I can only assume space in the path is the issue, that causes PowerShell to not find the file. When the file is directly moved into
repositories folder, it works flawlessly.
Any clues how I can fix this? It's quite annoying that I have to:
SHIFT+RIGHT_CLICK the folder -> open PowerShell -> write the .ps1 name -> hit enter