GSX Blog

PowerShell ISE: Tips and Tricks

Posted by Olivier Raynaut on Thu, Jun 27, 2013

PowerShell ISEThere were quite a few sessions on PowerShell this year at TechEd North America. Experts like Don Jones and Jeffrey Snover showed the audience some great tricks that I would like to share with you...As well as some of my own findings. Some of you are probably already experts using the shell but it is always useful to find some tips that ease the “PowerShell experience”, especially when you're writing scripts.

So, I would like to talk to you about PowerShell ISE!

Start ISE

The Integrated Scripting Environment (ISE) is a full GUI interface for editing and executing PowerShell scripts. Most of us will probably find this easier compared to the raw shell. ;)

The basic layout of the PowerShell ISE has three main frames: one for editing scripts, one actual shell window, and a toolbox of cmdlets.

PowerShell ISE Overview

In this shell, you will finally be able to copy/paste using Ctrl + C / Ctrl + V. You'll also be able to use autocompletion with cmdlets and name parameters, thanks to IntelliSense:

ISE IntelliSense 

Here's a good tip: you can select any lines you want and press “F8” to execute them.

Using the “Commands” panel, you can search for cmdlets:

Commands toolbox

 

PowerShell Tabs

You can open different Runspaces using the Ctrl + T shortcut, and even create a “Remote PowerShell Tab” using Ctrl + Shift + R. This will prompt you for parameters and credentials.

PowerShell remote tab 

Then, you will open a remote shell:

 Remote shell ISE

 

Another nice trick you can use either in the ISE or usual shell is the “Out-GridView” command. You will be able to pipe out most of the cmdlets and it will display the results in a convenient grid view that can be filtered:

Get-Service | Out-GridView

 Grid View

 

If you would rather copy/paste the results, you can change the output to “clip” to put the results on your clipboard:

Get-Service | clip

If you need to enhance the ISE experience, you can find some add-ons online by clicking:

PowerShell Add-ons

 

Fnally, do not forget to update the help files in PowerShell every once in a while. Simply use « update-help » in the shell. Be careful here, you might have to start PowerShell as an administrator in order for the update to be successful.

Here are some of the Scripts I use...To make using them a little easier, you can always import them during the PowerShell startup by following this tutorial.

I hope you learned some new tricks to help improve your daily PowerShell activities. Don't hesitate to give us your own tips in the comments below, I will be happy to try them!

GSX Solutions is the leading provider of monitoring and reporting solutions for Unified Communications applications, whether on-premises or in the cloud. Find out more now >>

If you haven't tried GSX' solutions yet, why not sign up for a free 14-day trial or request a personal demo.

 

Tags: Windows 8, TechED North America, Tips and Tricks PowerShell, TechED Europe, ISE, Powershell