PowerCLI is vmware powershell command line interface having modules to connect to Vcentre layer to manage the vmware esx hardware.
To manage the infrastructure one needs to Connect to VCentue host box.
The first thing you need to do after launching vSphere PowerCLI is to get a connection to a vCenter Server system. To get started, call the Connect-VIServer cmdlet and specify the IP address or DNS name of your vCenter Server system, 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 would be 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 (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:
Note that in vSphere PowerCLI, passing strings as a pipeline input is not supported.