Home > Blogs > VMware PowerCLI Blog


Back to Basics: Part 1 – Installing PowerCLI

The “Back to Basics” (B2B) blog post series will be showing people new to PowerShell and PowerCLI how to get started, they will be an ongoing feature on the PowerCLI blog and will cover each aspect of managing your virtual infrastructure with PowerShell and PowerCLI.

To get us started we have gone back to the beginning – Installing PowerCLI.

PowerCLI is typically installed on a vSphere administrators Microsoft Windows based desktop system or anywhere where you may currently run the vSphere Client, PowerCLI will access the vSphere API in a similar way to the vSphere Client so the same ports and access rights are needed to your vCenter or vSphere host.

In order to support installing PowerCLI to a desktop system the following prerequisites software packages must be present:

· Windows .Net Framework 2.0 (3.5 latest SP Recommended)

· Windows PowerShell (V2 Recommended)

Windows PowerShell V2 is integrated with Windows 7 and Windows 2008 R2, previous operating systems such as Windows XP, Windows Vista, Windows 2008 (Non R2) and Windows 2003 are compatible with Windows PowerShell, this must be first downloaded and installed from the following website: http://support.microsoft.com/kb/968929

After checking all pre-requests’ are installed you must set the 'Execution Policy' of PowerShell to enable it to be able to run scripts. By default PowerShell is installed in secure mode, which will disable the running of scripts within PowerShell.

To change the 'Execution Policy' start a PowerShell session with Administrator Privileges:

clip_image002

From the Window's Start menu type 'PowerShell', once the PowerShell program is displayed on the start menu Right Click 'Windows PowerShell' and select 'Run as administrator'.

A PowerShell prompt will be started:

clip_image004

It is recommended that you read more about PowerShell's different execution policies, to find out more information about these and ensure you change this to the correct setting for your organization enter get-help about_Execution_Policies at the PowerShell prompt.

In this guide we will change the execution policy to RemoteSigned.

From the PowerShell prompt enter: Set-ExecutionPolicy RemoteSigned

clip_image006

You will then receive information about execution policies and a prompt asking you to confirm your action before changing the execution policy, enter Y at the prompt and press enter.

You will then be returned to the PowerShell prompt with the change being completed. Type Exit and press Enter to leave the PowerShell prompt, this will need to be completed for both 32bit and 64bit PowerShell sessions.

You will now be ready to install VMware vSphere PowerCLI.

clip_image008

Download the PowerCLI software to your workstation from the following URL: http://vmware.com/go/PowerCLI

Once the software has been downloaded, start the install by double clicking the PowerCLI exe file.

clip_image009

The installer will firstly notify you that the additional component 'VMware VIX' will be installed as part of the PowerCLI install, click OK.

clip_image011

If you have not yet set your execution policy correctly an information box will appear advising you that this will need to be set to RemoteSigned before PowerCLI will execute correctly. Click the Continue button.

If the execution policy is set correctly this box will not appear.

This will bring you to the Welcome screen:

image

The welcome screen will now be shown welcoming you to the install wizard for PowerCLI, click Next to continue.

This will bring you to the VMware Patents:

clip_image015

Click Next to continue. This will bring you to the License Agreement:

clip_image017

Select the option ‘I accept the terms in the license agreement’ & then click Next to continue.

This will bring you to the Destination Folder:

clip_image019

Select the drive you would like to install PowerCLI onto and the folder name or leave this set as the recommended path and click Next.

This will bring you to Ready to install:

clip_image021

Click Install to begin the Install of PowerCLI.

This will bring you to Installing VMware vSphere PowerCLI

clip_image023

Please wait while the installation completes.

image ight="484" src="/tp/.a/6a00d8341c328153ef0154332fa798970c-pi" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" width="637" />

When the install is successful, the Finish screen will be displayed. To complete the installation click Finish.

The PowerCLI installation will now be completed and on your desktop you will now have two icons, which allow you to launch PowerCLI, a 64 bit version and a 32 bit version.

On your start menu in the Start –> All Programs –> VMware -> VMware vSphere PowerCLI folder you will now have access to the following items:

  • VMware vSphere PowerCLI (32-Bit)
  • VMware vSphere PowerCLI
  • vSphere PowerCLI Admin Guide
  • vSphere PowerCLI Cmdlets Reference
  • vSphere SDK for .NET API Reference
  • vSphere SDK for .NET Dev Guide

It is highly recommended that you read the ‘vSphere PowerCLI Admin Guide’ as this will provide the fundamentals of both PowerCLI and PowerShell and will aid in the learning process when starting out with PowerCLI.

B2B Part 1 FAQs

Q. Can I install PowerCLI on my vCenter Windows Server ?

A. Yes but normally it will be installed on your management PC or a server specifically setup to run scheduled PowerShell tasks, keep in mind that complex scripts may cause high CPU and memory usage which could impact other running programs on the same computer.

Q. How do I find out more about the Execution Policy ?

A. You can read more about PowerShell's different execution policies and ensure you choose the correct setting for your organization by typing get-help about_Execution_Policies at the PowerShell prompt.

This entry was posted in Uncategorized on by .
Alan Renouf

About Alan Renouf

Alan Renouf is a Product Manager at VMware focusing on Automation Frameworks and CLI, he is responsible for providing the architects and operators of the cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter. Alan is a frequent blogger at http://blogs.vmware.com/PowerCLI and has a personal blog at http://virtu-al.net. You can follow Alan on twitter as @alanrenouf.

One thought on “Back to Basics: Part 1 – Installing PowerCLI

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>