PowerShell ISE For Your VMware Automation IDE Needs

PowerGUI was my favorite PowerShell integrated development environment (IDE). However, the performance has been a little sluggish on my desktop, and I was wondering if there are any other alternatives that people are using. It turns out the community has been very active in extending the functionality of PowerShell’s own Integrated Scripting Environment (ISE) with various plugins and customizations.

I am using the following tools with ISE:

  1. VMware PowerCLI
  2. UCS Powertool
  3. ISE Steroids
  4. Posh-git (Included with the GitHub Desktop install)

The first two in the list are not exclusive to ISE, but they are helpful for getting the VMware and UCS functionality you need added to ISE automatically. ISE Steroids adds features to ISE that you might find in other IDE’s such as block commenting and automatically converting code into a function. ISE Steroids is optional, but if you spend a significant amount of time developing PowerShell, you may want to consider trying it out and eventually purchasing a license.

Getting Started

First, ensure that you are running PowerShell version 5:

$PSVersionTable.PSVersion

If you are running an older version, get the appropriate installer for your version of Windows.

Next, install the tools listed earlier.

Then, let’s run PowerShell ISE by opening a PowerShell window and typing the “ise” command.

Within ISE, run the following command to find your PowerShell settings file that is specific to ISE.

$Profile

Open the file listed in the output in ISE, and add the following lines to your profile BEFORE the start-steroids command:

. (Resolve-Path "$env:ProgramFiles\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1")

. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")

. (Resolve-Path "$env:github_posh_git\profile.example.ps1")

Save the file, quit ISE, and then restart ISE. You should now have UCS and PowerCLI cmdlets available. Also, if you clone a git repository locally, you’ll see an indication of whether you are in the master branch or in another branch that you may have created. See Figure 1.

PowerShell ISE with Plugins Loaded
PowerShell ISE with Plugins Loaded

Want more PowerShell ISE goodness? Chris Wahl shared some great information on using ISE for PowerShell development at VMworld and on his blog.

Also, a big thank you to Brian Graf for helping me get my profile settings setup correctly.

Do you have any tips or tricks for improving productivity with PowerShell? Share them below!

Leave a Reply

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