The Windows PowerShell Integrated Scripting Environment (ISE) is "Old Faithful" to most administrative scripters. As you probably know, the ISE ships with the Windows Management Framework (WMF); you sometimes but not always get a new ISE version when you update your WMF bits.
At the PowerShell & DevOps Global Summit this year, I watched a dozen PowerShell team members present "lightning demos" – quick walkthroughs of the features they were working on. Every single dev used the ISE, supporting the claim that Microsoft "eats its own dog food."
Microsoft's latest innovation for the ISE is to ship preview versions out-of-band to WMF releases; this gives brave souls like you and me the opportunity to test-drive new features.
Today, however, I want to share with you some of my favorite ISE add-ons. The ISE is eminently extensible – perhaps the best example of that extensibility is Dr. Tobias Weltner's acclaimed ISE Steroids add-on.
For that matter, you don't even have to be a .NET programmer to author your own ISE add-on. This oldish blog post from the PowerShell Team's Lee Holmes explains how you can build an ISE add-on by using Windows PowerShell. The sky's the limit for authoring your own add-ons, as long as you know how to write a PowerShell function and you're familiar with the $psISE object model.
Get started with PowerShell ISE add-ons ^
By default, Windows PowerShell ISE opens with the Command-add-on exposed, as shown in the following screenshot. You can toggle the add-on's visibility by clicking View > Show Command Add-on.
The Command add-on is a GUI combination of the Get-Command and Show-Command cmdlets. You can complete a parameter set and then run the command directly, insert it into the current script or console window, or simply copy the command to the Windows clipboard.
At base, Windows PowerShell ISE add-ons are Windows PowerShell modules. This means that you'll install them into your $PSModulePath environment variable, which on 64-bit Windows systems is:
You'll definitely want to read the documentation included in any ISE add-on you select, because it may have its own way of loading/unloading the extension. With no further ado, let's get started!
Script Browser ^
The TechNet Script Browser add-on is such a no brainer for Microsoft that it included a handy link to the tool in the ISE Add-ons menu. Oh wait – the link is broken, as shown here:
In this post, I'll assume that you're on a development system that supports PowerShellGet and Package Management. Fire up an administrative ISE session and let's install Script Browser from the PowerShell Gallery:
Install-Module -Name ScriptBrowser -Force -Verbose
Let's look at the module's command set:
Get-Command -Module ScriptBrowser | Select-Object -Property Name
So, we see there's actually a separate desktop application as well as the ISE add-on. Cool. Run Enable-ScriptBrowser to load the pane, and I'll walk you through its use:
- A: With almost 20,000 scripts to choose from, the ability to "favorite" ones you like is very handy.
- B: Filter can rule out scripts authored in non-native languages and/or targeted on platforms you don't support.
- C: Sort your results by popularity, release date, downloads, ratings, title, or author.
- D: All scripts and modules are community-rated, giving you an idea as to their relative popularity.
Once you select a script or module, the interface changes. I'll walk you through that next:
- A: Manage the script or module's "favorited" status.
- B: View the script's source code.
- C: Download any or all resources included with the project.
- D: Read the documentation.
- E: Copy the script to the clipboard.
- F: Open the script in a new ISE tab.
Keep in mind that these community-contributed resources may (a) contain bugs, (b) have incomplete documentation, or (c) have any other number of potential problems. At the least, though, I've found this add-on useful to give me a head start whenever I need to accomplish any repetitive IT administrative task.
Module Browser ^
I consider the Module Browser ISE add-on essential because of the ease with which you get visibility into your own locally installed modules. Of course, you can also search the PowerShell Gallery – that's a nice bonus.
Let's install the add-on:
Install-Module -Name ISEModuleBrowserAddon -Force -Verbose
You can run Get-InstalledModule to list any modules that you've installed from the PowerShell Gallery. The day I wrote this article, I couldn't use the Gallery Search feature, because the add-on reported:
Network error. Please check your internet connection and the proxy setting.
My internet connection worked just fine; thank you very much. Anyway, navigate to the My Collection tab and click the gear icon to manage the local system's module inventory as shown in the next screen capture:
ISE Geek ^
Install-Module -Name ISEScriptingGeek -Force -Verbose
This add-on is an entire toolbox of PowerShell productivity-related features. Read the documentation! Look at the module's command set:
Get-Command -Module ISEScriptingGeek | Select-Object -Property Name | Format-Wide -Column 2
Second, open the Add-ons menu and get busy!
Quick hits ^
I'll leave you with this hand-selected list of some other ISE add-ins (or standalone modules) that you might find useful. Have fun!
- Azure Automation: You can author and test Azure runbooks from the comfort of the PowerShell ISE.
- New-ISERemoteTab: This makes it much easier to connect to one or more remote machines, even using different credentials.
- ISE Project Explorer: View your PowerShell script project in a tree view, similar to Visual Studio.
- PowerShell ISE Add-on Tool Index: This is a big list of ISE resources!