Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I open a ps1 script in Powershell ISE from the command line?

Tags:

powershell

I'm trying to figure out how I can open a ps1 script (or any file) in PS ISE by using the $psISE object.

How can I open a document tab in PS ISE from the command line in PS ISE itself (without using File > Open)?

like image 674
Eric Schoonover Avatar asked Aug 27 '09 05:08

Eric Schoonover


People also ask

How do I open a PowerShell script from the command line?

The command to open Command Prompt from Windows PowerShell is exactly the same as the command to open Command Prompt from Command Prompt. In Windows PowerShell, just type start cmd.exe and press Enter.

How do I Run a PowerShell script from the terminal in PowerShell?

Running a script with PowerShell To open the PowerShell console, click on the Start button (or search button), type powershell, and click Run as Administrator. To run a script in the PowerShell console, you can either: Use the full path to script, like: C:\TEMP\MyNotepadScript. ps1.


2 Answers

psEdit filename

like image 174
Doug Finke Avatar answered Sep 20 '22 17:09

Doug Finke


PowerShell 2.0 in Windows 7, PSEdit does not work. Use "ise", which is an alias for powershell_ise.exe.

ex. ise .\myscript.ps1 
like image 29
Rick Avatar answered Sep 21 '22 17:09

Rick