In the first version of Windows PowerShell, Microsoft didn’t provide an integrated development environment (IDE) for PowerShell. In PowerShell 2.0, the PowerShell team filled that gap by adding a PowerShell IDE called the Integrated Scripting Environment (ISE). It provides an easy-to-use interface for editing and debugging scripts.

The ISE window is divided into three panes by default:

• The script pane (element F) is the ISE’s script editor. You can open multiple files and switch between them easily. When you open more than one file, each file gets its own tab. The script editor colorizes script code to help you identify syntax errors, automatically indents lines of code, and provides Tab-key command and path completion for paths, cmdlets, and cmdlet parameters.

• The output pane (element G) shows the output from PowerShell scripts and commands executed in the ISE.

• The command pane (element I) is an interactive PowerShell prompt.

Floating the mouse cursor over the toolbar buttons displays the buttons’ functions in pop-up tooltips. The ISE’s shortcut keys aren’t shown in the toolbar button tooltips, but they are displayed in the menus. All of PowerShell’s Help topics are available in the ISE. Press F1 to access the topics. If you position the cursor on a cmdlet name, pressing F1 will open the PowerShell Help file to that cmdlet’s Help page.



Navigating the ISE
The tabs at the top of the script pane represent open script files. When you start a new script (select File, New or press Ctrl+N) or open an existing script (select File, Open or press Ctrl+O), the ISE adds a new script tab (element D) to the top of the script pane.

In addition to script tabs, you can also open a new PowerShell tab (element C), which appears above the script tabs, as shown in Figure 1. Each PowerShell tab represents a new PowerShell instance, or execution environment, inside the ISE. This means that variables, functions, and aliases that you create in one PowerShell tab aren’t visible when you switch to a different PowerShell tab. (Opening a new PowerShell tab is like starting a new powershell.exe console instance.) You open a new PowerShell tab by selecting File, New PowerShell Tab or by pressing Ctrl+T. Note that when only one PowerShell tab is open, it’s not shown.

You can adjust the ISE’s three panes several different ways using the View menu:

• You can select Show Script Pane Top (or press Ctrl+1) to move the script pane to the top of the ISE window. This is the default configuration.

• You can select Show Script Pane Right (or press Ctrl+2) to move the script pane to the right half of the ISE window.

• You can select Show Script Pane Maximized (or press Ctrl+3) to hide the command and output panes, maximizing the screen real estate for editing scripts.

• You can select Hide Script Pane (or press Ctrl+R) to hide the script pane, making more room for the command and output panes. Clicking the button next to element E in Figure 1 will also hide the script pane.

• You can select Command Pane Up to move the command pane above the output pane. This option doesn’t have a keyboard shortcut, but you can click the button next to element H.

Source of Information : Windows IT Pro June 2010

0 comments


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner