Prof. Powershell

Apply ISE Pack As Needed

I use PowerShell's Integrated Script Editor Pack mostly for one must-have feature, but there's a whole host of cool scripting tools you might also want to check out.

There's no question that the Windows PowerShell Integrated Script Editor is a superior alternative to Notepad. If you don't have a commercial script editor, then you should at least be using the ISE. Granted, the ISE by design is simple, but it is extensible. Fortunately someone else has already done the extending.

The PowerShell Pack that is part of the Windows 7 Resource Kit contains 10 modules for extending PowerShell. One of those modules, the ISEPack, is designed to extend the ISE. You can download the PowerShell pack here.


After you install the PowerShellPack, open an ISE session and import the ISEPack module:

Import-Module ISEPack

You may not notice much happening. But take a look at the menu and you should now see an Add-Ons menu. Underneath you'll see ISEPack and from there all of the available commands. Most of these commands assume you have a script open in the editor and something selected. Or go ahead and create a new script. Enter a command like this:

get-process w*

With your cursor anywhere in the line, press F6, which invokes the ISEPack command to execute the current line. Or perhaps you don't recall what properties are available for a process object. Select the cmdlet name, get-process, and press Alt+M. You'll get an Out-Gridview result displaying the process object.

Or perhaps you'd like to research this cmdlet. Select the cmdlet name and press Ctrl+B. Your browser should open to a Bing page showing results for the selected text; in this case, it's the cmdlet name.

My favorite feature is toggle comments. Very often when developing a script I want to take a block of commands and comment them out. Without the ISEPack I have to manually insert the comment character at the beginning of each line. But with the ISEPack all I need to do is select the lines and press Ctrl+Alt+C. The lines are now commented. Pressing Ctrl+Alt+C again toggles the comments off. This is the primary reason I use the ISEPack.

I hope you'll try out many of the other ISEPack features. Be sure to read the help files about_ISEPack_Readme and about_ISEPack_Modules to learn more.


About the Author

Jeffery Hicks is a Microsoft MVP and an IT veteran with almost 20 years of experience, much of it spent as an IT consultant specializing in Windows server technologies. He works today as an independent author, trainer and consultant. His latest book is Managing Active Directory with Windows PowerShell 2.0: TFM (SAPIEN Press 2011). Follow Jeff on Twitter and on his blog.

Reader Comments:

Thu, Jun 3, 2010

I have to say the primary reason that I use the ISEPack is for color copying of the text Ctrl+Shift+C. Excellent for documentation. Also copy in color in html, is excellent for posting code on supported websites or blogs Ctrl+Alt+Shift+C. This is one module that I load by default.

Add Your Comment Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above