Part 2: Connect To vCenter 6.0 Using PowerShell

In this article, I’ll show you how to connect to VMware vCenter 6.0 using PowerShell.

To get started, check the first article In this series, Part 1: Manage VMware With PowerShell where I show how to Install PowerCLI.

Once you have PowerCLI Installed, Start the Shell

To connect to vSphere use the cmdlet below (change IP \ Hostname):

Connect-VISserver -server 192.168.100.2

Once connected you will see your vCenter details

To auto Connect to vCenter use the code below:

$srv = Connect-VIServer VSERVER -User admin -Password pass

Connect-VIServer VSRRVER -Session $srv.SessionId

To view all PowerCLI cmdlets use the cmdlet below:

get-Command -Module *vmware* | Out-GridView

Leave a Reply