ISE Addons, PowerShell, ShowUI, WPF
comments 13

A simple PowerShell script explorer addon using ShowUI

Update: The select-ViaUI function is no more in ShowUI module starting version 1.2. So, if you plan to run this, you need to go back to ShowUI 1.1.

Okay, there is nothing really fancy here. This is all done in just ten lines of PowerShell code. In fact, only 3 lines for the real logic. I am not even creating my own UI to do this. This is all done using the Select-ViaUI cmdlet in ShowUI module. Here is how it looks:

Script Explorer

Script Explorer

So, within this addon, I list all ps1, psm1, and xml files at a pre-defined location. At the bottom, you see a search box. If you find it difficult to scroll to the item you want, you can just type the name ( or partial name) and filter the list. Once you select the item, just click OK to open that file(s) in ISE. Simple!

Here is the code:

Just execute the above code or add the above code to your ISE profile and restart ISE. Now, when you press Ctrl+Alt+E, this addon will search for files at the specified path and show you the list. You can select multiple files and click OK to open those files in ISE.

Of course, I could have built a simple UI myself to add a way to select a path and filter the file extensions I need. But, I did not see a need to do that since all my scripts are always stored at C:\Dropbox\Scripts and I just have to search only that folder.

So, if you want to use this addon as is, make sure you update the scripts location and filter criteria.

Filed under: ISE Addons, PowerShell, ShowUI, WPF


Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.