You may set the default file association of ps1
files to be powershell.exe
which will allow you to execute a powershell script by double clicking on it.
In Windows 10,
ps1
fileOpen with
Choose another app
More apps
Look for another app on this PC
. C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
. That will change the file association and ps1
files will execute by double-clicking them. You may change it back to its default behavior by setting notepad.exe
to the default app.