Windows 8 – Administrative Tools – Windows PowerShell ISE

September 7, 2012
38
Views

How to Launch It

Control Panel Way

  • Open “Administrative Tools” applet from the traditional Control Panel.
  • Launch “Windows PowerShell ISE” from the list of administrative tools.

Command Way

  • Invoke Run window or Search Charm. Select the Settings tab in case of Search Charm.
  • Type in the command “PowerShell_ISE.exe”, and hit Enter.
The so-launched window looks similar to an Integrated Development Environment.

Display Structure

The ISE is divided into three panes.
  • Scripting Pane – This is the pane where your write PowerShell script. The barebones console PowerShell gives a real pain if you want to write multiline scripts. This pane is a much more viable option than that.
  • Console Pane – The results of your executed scripts show up here. Additionally, you can directly type in PowerShell cmdlets in the window, in case you want to do some rapid “PowerShelling”.
  • Commands Add-on Pane – Did a cmdlet just miss your brain? No worries. You can look up for it in this pane. It lists all the cmdlets provided by PowerShell, categorized depending on which Windows Module they belong to.
As an example, I have written a two-line script in the scripting pane. The first line uses a simple echo (an alias of Write-Host) command to print a message “Number of the current week of 2012 is –“. The following line runs a cmdlet Get-Date that fetches today’s date. By passing it two attributes to it, I asked the cmdlet to morph the output to display only the current number of week. When I ran the script, it displayed the desired output in the console pane.

Features of PowerShell ISE

ISE provides several rich development features like:
  • Multiline editing – My example is a two-line, nevertheless, a multiline script.
  • Tab completion – Type in several letters, and then hit Tab key. PowerShell will complete whatever you are typing with the closest match. You can keep pressing Tab till you get the desired result.
  • IntelliSense – Tab completion is a rudimentary feature. Being a rich development environment, ISE also provides IntelliSense. While typing something, if you hit Control+Enter key combo, then ISE presents you with a list of possible commands. The above figure shows a dropdown autocomplete list. The IntelliSense feature is not just limited to completing cmdlets; it can aide you by providing suggestions for parameters, values, paths, variables, properties, methods, etc.
  • Syntax coloring – It gives you the feel of an IDE.
  • Selective Execution – One of the cool features of ISE. You can select some part of your script and run it independently. Select the desired part, and hit F8. PowerShell will execute only the selected script and display the result in console pane.
  • Debugging – You can debug a lengthy script. You can insert breakpoints for that.
  • Tabbed UI – Work with several scripts together by opening them in several tabs.
]]>

Article Categories:
Microsoft · Windows 8 Tutorial

Mike Johnson is a writer for The Redmond Cloud - the most comprehensive source of news and information about Microsoft Azure and the Microsoft Cloud. He enjoys writing about Azure Security, IOT and the Blockchain.

Leave a Reply

Your email address will not be published. Required fields are marked *