Objectives
- Install and configure vSphere PowerCLI
- Install and configure Update Manager PowerShell Library
- Use basic and advanced Cmdlets to manage VMs and ESXi Hosts
- Use Web Service Access Cmdlets
- Use Datastore and Inventory Providers
- Given a sample script, modify the script to perform a given action
Install and configure vSphere PowerCLI
Official Documentation:
vSphere Power CLI User’s Guide 5.0, Chapter 3 “Installing vSphere PowerCLI”, page 15.
Summary:
vSphere Power CLI User’s Guide 5.0, Chapter 2 “vSphere PowerCLI System Requirements” presents an overview of the supported Operating Systems, required software and supported VMware environments.
Windows versions starting from XP SP2 are supported. To run vSphere PowerCLI, you need:
- .NET 2.0 SP1
- Windows PowerShell 1.0/2.0
Most VMware environments are supported.
vSphere PowerCLI can be downloaded from: http://www.vmware.com/go/powercli
Installation is straightforward. If the PowerShell Execution Policy on your machine is set incorrectly, a warning message appears before finalizing the vSphere PowerCLI installation. Ignore it and continue with the installation.
For security reasons, Windows PowerShell supports an execution policy feature. It determines whether scripts are allowed to run and whether they must be digitally signed. By default, the execution policy is set to Restricted, which is the most secure policy. If you want to run scripts or load configuration files, you can change the execution policy by using the Set-ExecutionPolicy cmdlet.
Start the vSPhere PowerCLI console and type:
Set-ExecutionPolicy RemoteSigned
Other references:
- A
Posted by paulgrevink 