Here’s hoping the PowerShell community doesn’t block me from their websites for my awful taste of music.
Today’s topic is the ISE, the Integrated Scripting Environment. This PowerShell host application, written in WPF, is new as of PowerShell v2.0. In this post, we will look at some of my favorite features.
As one who writes script files more than just one-off commands, I like that the ISE has 3 panes – the Script Pane, the Command Pane, and the Output Pane. The order of these panes can be toggled from a menu or via keyboard shortcuts. Here are the basics of these panes:
- Script Pane: This a pane dedicated to editing multi-line scripts. Some of the features I particularly am fond of with the Script Pane are syntax highlighting, debugging, and tab completion.
- Command Pane: This is a pane dedicated to run commands on demand. Think of it as the console.
- Output Pane: This is where the commands from the Command Pane and the scripts from the Script Pane output their results.
As a developer who prefers keyboard shortcuts rather than clicking buttons, I also am super happy that the shortcuts for running and debugging scripts in the ISE match up with keyboard shortcuts in Visual Studio. These are a few keyboard shortcuts that are the same:
- F5 – Run
- F9 – Toggle Breakpoint
- F10 – Step Over
- F11 – Step In
- Shift + F11 – Step Out
Using the ISE as an Editor
In Matt’s post on profiles, he talked of editing the $profile file with notepad. For me, I tend to run the following command to the ise alias instead when I’m in the console:
The reason why I like the ISE for updating my profile files is because I have syntax highlighting, as seen below:
A Note on ISE Profiles
Applications that host PowerShell can implement any or all of the profiles. In my post on profiles, I noted that there were 4 console profiles. The ISE has 2 profiles of its own:
- $profile, $profile.CurrentUserCurrentHost
This covers some of the basics of the ISE. If you want to learn more, you can run: