Quantcast
Channel: ISE Addons – Ravikanth Chaganti
Viewing all articles
Browse latest Browse all 34

A simple PowerShell script explorer addon using ShowUI

$
0
0
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: 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: $scriptBlock = { if (!(Test-Path Function:\Select-ViaUI)) { Import-Module ShowUI } $selection = Get-ChildItem C:\DropBox\scripts -include *.ps1,*.psm1,*.xml -Recurse | Select Name, FullName, Extension | Select-ViaUI …

Viewing all articles
Browse latest Browse all 34

Trending Articles