<

Beginners Guide to Windows PowerShell Integrated Scripting Environment (ISE)

Published on
12,892 Points
5,892 Views
10 Endorsements
Last Modified:
Approved
The PowerShell ISE is a Windows host application that provides an expanded console for scripting.  Some of the key features includes a built-in script editor with syntax highlighting, tab completion and integrated help commands, as well as a launcher and debugger.  For users who are wanting to learn PowerShell or freshen up their scripting knowledge, the ISE is often the easiest and most comprehensive resource that is available.

To get started, we will first need to open the PowerShell ISE*.  From the Start screen, we can use the search search box and type in PowerShell ISE, or we can navigate to the Windows PowerShell folder - C:\Windows\System32\WindowsPowerShell\v1.0, C:\Windows\sysWOW64\Windowspowershell\v1.0\powershell.exe, or C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe, depending on your OS, and select the program shown below as powershell_ise.exe.

powershell_ise.exe
The first thing you should notice is the addition of a scripting pane set either over, or beside the console pane depending on your setup.  This layout can be changed using the different view buttons noted with the ribbon section below.

powershell ise panes
Next, we have the ribbon, complete with the familiar File, Edit, View, Tools, and Help menus, as well as the additional Debug and Add-ons menus.

The icons on the lower ribbon represent, from left to right:

New (Scripting/Console Tab), Open, Save, Cut, Copy, Paste, Clear Console, Back, Forward, Run (Send to Console), Run Selection, Stop Operation, New Remote Tab (remoting to another machine), PowerShell (Start regular PS console) and the different layout view options.

powershell ise ribbon
While compiling a script in the Scripting pane, we have the option to use the Run and Run Selection options to pass the script to the console.  During a session, you may see that your console pane is beginning to fill up and get cluttered.  Using the Clear Console button, we can clear the console pane without clearing the scripting pane.

Using the Debug menu, we can debug a script using Step Over, Step Into, Step Out and other options like working with Breakpoints.

powershell ise debug menu
In the following example, I am using the PowerShell ISE auto-suggest/auto-complete feature to look for available options in a Form:

powershell auto-suggest/auto-complete
We are also prompted about potential code errors as we type:

powershell ise error warning
Another great feature is the Command Add-ons, that can be used for identifying and learning new cmdlets.

command add-on
You are able to sort through modules, or search for a cmdlet by name.

command add-ons modulescommand add-ons search
Hopefully now you will have learned some of the basics of the PowerShell ISE and are ready to begin on a scripting adventure of your own. To get help at anytime while in the PowerShell ISE, you can navigate to the Help menu > Windows PowerShell Help, or press F1.


*For users who are running a 64-bit OS, you may notice two versions of the PowerShell ISE, both a 32-bit and 64-bit version.  To make a long topic short, you are normally better off in the 64-bit version unless you are needing to interact with 32-bit applications or cmdlets that only work in the 32-bit version.
10
Comment
1 Comment
 
LVL 66

Expert Comment

by:Jim Horn
Nicely illustrated.  Is a sequel to this article in the works?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Join & Write a Comment

Loops Section Overview
Screencast - Getting to Know the Pipeline

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month