vSphere PowerCLI Overview

VMware vSphere PowerCLI includes numerous cmdlets, a set of sample scripts, and a function library that make managing and automating the vSphere easier than ever before.

vSphere PowerCLI is a command-line and scripting tool based on PowerShell that provides useful functionality for vSphere management.

Usage

The first thing you need to do after launching vSphere PowerCLI is to get a connection to a vCenter Server system or ESX host. To get started, call the Connect-VIServer cmdlet and specify the IP address or DNS name of your vCenter Server system or ESX host, the protocol (http or https), user name, and password.

Connect-VIServer –Server 10.22.36.36 –Protocol https –User admin –Password pass

Once your server session is established, you are able to use the rest of the provided cmdlets. For example, to browse the virtual machines on the server, run the following cmdlet:

Get-VM

To retrieve a virtual machine by name, run:

Get-VM -Name "Win XP SP2"

All vSphere PowerCLI cmdlets parameters that take as arguments inventory objects (Cluster, Datacenter, Folder, ResourcePool, Template, VirtualMachine, VMHost), datastores, OSCustomizationSpec objects, or VIServer objects support the Object-by-Name (OBN) selection feature and wildcards. To learn more about OBN, in the vSphere PowerCLI console window run:

Get-Help About_OBN

Note that in vSphere PowerCLI, passing strings as a pipeline input is not supported.

Additional Information

For more information about vSphere PowerCLI and the available additional sets of cmdlets, go to the product documentation web page.

To get help, share best practices, or provide feedback to the vSphere PowerCLI team, visit the vSphere PowerCLI Community and the vSphere PowerCLI Blog sites.

Support is available through http://www.vmware.com/support/ .


Send feedback | Technical Support | Copyright © 1998 - 2011 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.