On April 8th we had a very good DutchVMUG meeting, which was totally dedicated to using PowerCLI and The VESI (Virtualization EcoShell Initiative). Although setting up the environment is straightforward, I wanted to do a small write-up which leads you through the install process and includes all download links needed.
The complete setup of the PowerCLI/The VESI environment includes 3 steps:
- Installation of Windows PowerShell
- Installation of VMware PowerCLI
- Installation of The Virtualization EcoShell
It’s important that these steps are executed in this specific order. For a complete overview of download links and other interesting PowerShell/PowerCLI links, please visit my PowerCLI page.
Step 1 – Installation of Windows PowerShell
Windows XP, Windows Vista, Windows Server 2003 en Windows Server 2008
- First install the Microsoft .NET framework. I advice to install .NET framework 3.5 Service Pack 1, because this is needed if you want to use the out-gridview cmdlet.
- Next install Windows PowerShell 2.0, which is part of the Windows Management Framework
Windows 7 en Windows 2008 R2
- No installation required, because Windows PowerShell is already pre-installed with these Windows versions.
Step 2 – Installation of VMware PowerCLI
The installation of VMware PowerCLI is very straightforward, just follow the next, next saga.
For security reasons PowerShell doesn’t allow for the execution of scripts at all by default. This mode is the “Restricted” execution policy, in which PowerShell operates as an interactive shell only. In order to execute scripts we need to change this execution policy to “RemoteSigned” to allow for the execution of our own scripts and downloaded (or remote) scripts only if they are digitally signed by a trusted publisher.
- Start PowerCLI. Go to Start > Programs > VMware > VMware vSphere PowerCLI > VMware vSphere PowerCLI
- Set the execution policy to “RemoteSigned” by running the following in a PowerShell prompt
Step 3 – Installation of The Virtualization EcoShell
To install The Virtualization EcoShell just follow the next, next saga again.
Before you can run scripts inside the Virtualization EcoShell you have to add one or more managed hosts. This can be a vCenter server or just a standalone ESX server.
- Select Start>Programs>Virtualization EcoShell> Virtualization EcoShell
- Expand the VMware node
- Select Managed Hosts
- Select Add Connection
The “Add Connection” window is displayed.
- Click the selection icon
The “Select Values” window is displayed.
- Enter the IP address or the fully qualified domain name of a vCenter server or an ESX server.
- Click Add followed by OK
- Close the “Add Connection” window by clicking OK.
Using this procedure you can add multiple Managed Hosts. After adding Managed Hosts we need to connect to one or more before we can run a script.
- Select the Managed Host
- Click Connect
The “Windows PowerShell Credential Request” window is displayed.
Log in using a user account that has permissions on the selected Managed Host.
- After successfully connecting to the Managed Host, the “Connected” property is set to “True”.
To use the full potential of the Virtualization EcoShell you have to install a PowerPack. The included VMware PowerPack already contains some powerful scripts, but there’s another mandatory PowerPack in your Virtualization EcoShell installation and that is the VMware Community PowerPack. This new PowerPack was announced on the PowerCLI/TheVESI DutchVMUG meeting by Alan Renouf and it’s the new version of his former Virtu-Al.Net PowerPack.
- Select File>PowerPack Management
- Click Import
- Select the “Virtu-Al.net Scripts.Powerpack” file
- Click Open
The PowerPack and its version information is shown in the “PowerPack Management” window. From here the PowerPack can also be updated when the new version becomes available.
- Click Close to close the “PowerPack Management” window.
On the left side there’s now a new “VMware Community PowerPack” node, which can be expanded to explore all those great scripts inside. Just click on a script to execute it and have it reveal that valuable information from your virtual infrastructure.
- PowerShell / PowerCLI linkage Tweet Since I started looking into PowerShell and PowerCLI, I gathered a couple of links which I found interesting and useful. I needed a way for them to be accessible...
- PowerCLI: Match VM and Windows harddisks – Part 2 Tweet This is a follow up on a post I did a couple of weeks ago to create a mapping table between Windows- and VMware hard disks. In another previous...
- PowerShell Plus™ 3.1 out now Tweet Idera released PowerShell Plus™ 3.1 PowerShell Plus is a powerful interactive development environment for Windows PowerShell designed to help administrators and developers quickly learn and master the PowerShell scripting...
- Setting custom attributes with VMware PowerCLI Tweet Last week I wanted to extend my vCenter with some extra custom attributes on my VMs. This would extend the usability of the Export List feature for reporting purposes....
- Installing ESX 4.0 on VMware Fusion Tweet If you love VMware you have to love Apple and if you love ESX4.0 you have to love a Mac. Well, at least I know I do. Both companies...