open with... help

hello I am trying to open a .ps1 file(powershell file) with a C++ program. The problem I meet is that the .ps1 file is opening in Powershell ISE. I want to make it open with Powershell command line. Is there a function or a bunch of code that do so?

Thanks!!


Powershell command line help page:
https://technet.microsoft.com/en-us/library/hh847736.aspx

It looks like you want to specify the 'PSConsoleFile' flag. Permanent changes in the file associations are done in the registry on a per user basis.
Topic archived. No new replies allowed.