I have a very powershell script that works perfectly and does:
Param(
[string]$fileName
)
echo "Woo I opened $fileName"
When I run it on the command line, it works:
my-script.ps1 .\somefile
Returns:
Woo I opened somefile
I would like to associate my-script.ps1
with a particular file type. I am attempting to do this via 'Open With' However:
- Windows doesn't include Powershell scripts as 'Programs' (though it considers CMD and batch scripts as 'Programs')
- When I pick 'All Files' instead, and pick my powershell script, Windows shows this message
How can I associate a file type with a Powershell script?
ps1
to the list alongsidecom
andbat
. π β Ricer