DevPreview, PowerShell, vNext
comment 1

PowerShell ISE v3 Script Explorer addon

 

Note: The content of this article applies only to PowerShell vNext

A while ago, I wrote about a script explorer addon for ISE using ShowUI. Well, if you have been following the BUILD news, you may already know that there is PowerShell vNext available in the Windows 8 Developer Preview. In PowerShell vNext — to build something very similar to what I showed you earlier — you don’t need ShowUI!

In vNext, PowerShell team included a -Passthru parameter for Out-GridView cmdlet. Using this passthru switch parameter, whenever you select items in the grid view and click OK, the selected objects can be passed to the next cmdlet in the pipeline. Or, the selected objects can be assigned to a variable as I did. Nice, isn’t it?

Now, using this additional capability, let us see how we can build the same addon.

Just run this above code so that the addon menu item gets enabled. Now, either use the keyboard shortcut (Ctrl+Alt+E) or Select Add-ons -> Explore to bring up the grid view. Here is how it looks on my system:

Script Explorer

Script Explorer

You can use the built-in filtering capabilities to filter the contents of grid view and then select one or more files and click OK to open those files in ISE editor pane.

Filtering Grid

Filtering Grid

Overall, this is just a quick glance of how PowerShell vNext. More such posts will be coming soon!

Filed under: DevPreview, PowerShell, vNext

by

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.