VMware vSphere PowerCLI 4.0 Update 1 includes more than 160 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.
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 mypass
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:
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 (
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:
Note that in vSphere PowerCLI 4.0 Update 1, passing strings as a pipeline input is not supported.
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 VI PowerShell Blog sites.
Support is available through http://www.vmware.com/support/ .