Select Page

During our SharePointPro Magazine webinar last week we were asked a question about why should we use an Integrated Scripting Environment (ISE) for PowerShell.

Good question!

Here are my top reasons why I believe you should use an ISE

1. Simple to view, fold and manage scripts

Most ISEs have advanced visual functions to make it easy to collapse/expand (or fold) scripts so they are easy to work with. Combined with good block discipline and use of functions and regions in your scripts makes editing blissful. Want to compare two scripts? Open up multiple tabs. It’s word processing for PowerShell people!

2. Error Checking

We’re not perfect. We make mistakes in our scripting, right? Just like Microsoft Office, most ISEs provide a visual cue when something is not quite right in the script.  In the example below you can see the red underline beneath “ErrorAction” in this case because it’s on a new line and should not be.  Easy to miss when using notepad!

ise good

3. Source Control

Many of the ISEs available have some means of source control. With PowerGui (my ISE of choice, others are available) you can wire it up to TFS via Visual Studio. Nice.

3. Debugging Tools

The power of PowerShell is also its weakness. You can do mighty damage or generate quirky, unexpected results if you’re not absolutely certain what’s going on. The ability to insert breakpoints, step through and over code and otherwise debug in a controlled way reduces the likelihood of bad things happening.

4. Contextualised Help

In most ISEs if you type something (for instance a cmdlet name) then hit F1, you get the help file in a pop-up window. Cool.

5. Standard Editing Controls

Like using Ctrl+C, Ctrl+V, Ctrl+X, etc.? Well an ISE supports all the usual Ctrl key combos and more.

There are more reasons to use an ISE, but I don’t have all day 🙂

more to follow…