Open Scripts in a new tab in the PowerShell ISE using PSEdit

While at TechEd last week, PSEdit was used in one of the PowerShell sessions that I sat through. Afterwards a couple of friends asked me if I had ever heard of it and said they hadn’t so I thought I would write a blog article about it to help spread the word.

PSEdit is a function that only exists in the PowerShell ISE. Type in PSEdit followed by the name of a PowerShell script and that script will be opened in a new tab in the ISE:


Try the same thing in the PowerShell console and you’ll end up with an error message:


Since psEdit is a function and not a compiled cmdlet, you can take a look under the covers to see what it does behind the scenes:


There’s very little help for psEdit and this is even after running Update-Help from within the PowerShell ISE:


Even though the filenames parameter doesn’t show it accepting an array [], based on the code and a little testing, a common separated list can be used to open multiple scripts:


I’ve actually written a previous blog article to locate and open scripts in the PowerShell ISE that uses the same behind the scenes code as psEdit that you may also find interesting.


About Mike F Robbins

Mike F Robbins is a Microsoft MVP on Windows PowerShell and a SAPIEN Technologies MVP. He is a co-author of Windows PowerShell TFM 4th Edition and is a contributing author of a chapter in the PowerShell Deep Dives book. Mike has written guest blog articles for the Hey, Scripting Guy! Blog, PowerShell Magazine, and He is the winner of the advanced category in the 2013 PowerShell Scripting Games. Mike is also the leader and co-founder of the Mississippi PowerShell User Group. He blogs at and can be found on twitter @mikefrobbins.
This entry was posted in PowerShell and tagged . Bookmark the permalink.

One Response to Open Scripts in a new tab in the PowerShell ISE using PSEdit

  1. Graeme says:

    After playing with this, you can also open anything that may have the string ‘DHCP’ in the title for example, if your version control is -v1 -v2 etc. Typing on my phone, but I think you get the point.

    You can just the wildcard of * if I remember correctly.

    You do have to be in the same directory of course.

Leave a Reply