- September 16, 2015
- Posted by: Surender Kumar
- Category: PowerShell
Windows PowerShell ISE
Table of Contents
The Windows PowerShell Integrated Scripting Environment (ISE) is one of two hosts for the Windows PowerShell engine and language. In Windows PowerShell ISE, you can write, run, test, and debug the scripts in a single Windows-based graphic user interface with multiline editing, tab completion, syntax coloring, selective execution, IntelliSense and context-sensitive help. You can use menu items and keyboard shortcuts to perform many of the same tasks that you would perform in the Windows PowerShell console.
The Windows PowerShell ISE lets you customize some aspects of its appearance. It also has its own Windows PowerShell profile, where you can store functions, aliases, variables, and commands you use in the Windows PowerShell ISE. The Windows PowerShell ISE is available on any computer that can run Windows PowerShell v2.0 or later.
Features of PowerShell ISE
Here are some important features of Windows PowerShell ISE:
- Snippets: Snippets are short sections of code that you can easily insert into the scripts your write. A collection of useful snippets is included in the box and you can more by using the New-Snippet cmdlet.
- Selective Execution: To run part of a script, select the text you want to run, and then click the Run Script button or press F5.
- IntelliSense: IntelliSense automatically completes your commands by displaying menus of matching cmdlets, parameters, parameter values, files, or folders as you type.
- Context-sensitive Help: Type any cmdlet and then press F1. The Help file opens to the Help topic for the specific cmdlet you have typed.
- Restart Manager and Auto-save: It automatically save your scripts every two minutes to help you avoid the loss of your work in the event of a crash or unexpected restart.
- Most Recently Used List: It is now part of the File Open menu to make it easier to get to the files you use most often.
- Merged Console Pane. Command and Output Panes are combined into a single pane that more directly mimics what you see in the Windows PowerShell Console.
- Command-line Switches. Several new command-line switches give you more control over the way the ISE works. The –NoProfile switch starts the ISE without running a profile script. The –Help switch opens up a help window with the ISE. The –mta switch starts the ISE in “multi-threaded apartment mode”. The default is single-threaded.
- New Editor Features: New features like XML syntax coloring, Brace matching, Outline view, Drag and drop text editing, Parse error display, Zoom, Rich text copy and paste, and Block selection make it easier to create and read your code.
Start Windows PowerShell ISE
To start Windows PowerShell ISE, follow any one of the steps given below:
- Click Start and type PowerShell in search box, then click Windows PowerShell ISE.
- Open the run dialog (Windows+R) and then type powershell_ise in Run dialog and press Enter.
- To start PowerShell ISE from within Windows PowerShell console, type powershell_ise command.
- To start PowerShell ISE from cmd.exe, type powershell_ise command.
The Figure below shows Windows PowerShell ISE user interface:
It takes little time to become familiar with Windows PowerShell ISE interface. The ISE interface has three panes:
- Script Pane: This pane is the code editor where you write and debug PowerShell scripts. You can also run scripts or parts of scripts from this pane.
- Console Pane: The Console Pane is similar to a PowerShell command shell. You can enter commands directly into the Console Pane, run them, and see the results displayed within that pane.
- Add-on Tools Pane: You can use this pane to access add-on tools. By default, the PowerShell ISE includes the Commands add-on, which is automatically displayed in the Add-on Tools Pane whenever you open it.
Customize PowerShell ISE Interface
The PowerShell ISE provides a number of options to customize the interface. You can access these options by clicking Tools menu and clicking Options. When the Options dialog box appears, it opens to the Colors and Fonts tab, as shown in Figure below.
Here you can set the colors and fonts used in the Script and Console Panes. You can set how you want to color various language elements in the Script and Console Panes.
In addition to configuring the colors and fonts, you can also configure a number of other options on the General Settings tab as shown in Figure below.
Here you can configure settings related to the Script Pane behavior, IntelliSense, and other aspects of the PowerShell ISE window.