Prepare the connection to the vCenter

Before you can use PowerCLI you have to configure the behavior of PowerCLI if the vCenter provides an unknown certificate. Under normal circumstances – when I am in a separated and firewalled environment, I configure PowerCLI to ignore unknown certificates.

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore 

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/847b8d79-9752-43d3-8217-8270ab647679/9e3681cf-989d-4bf9-94b2-30dd819f9abc/GUID-875C2A87-0AC9-4B28-9361-5B283AFE114E.html You need to do this only the first time you use PowerCLI on a system!

A confirmation screen appears, select "Yes to All"

Probably there is a message shown that you should join the VMware Customer Experience Improvement Program.

You can deactivate this with the following command

Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false 

A confirmation screen appears, select "Yes to All"

Set the option to connect to multiple vcenter at the same time

Set-PowerCLIConfiguration -DefaultVIServerMode Multiple

A confirmation screen appears, select "Yes to All"

After this you can connect to the vCenter

Connect-VIServer -Server <IP or DNS name of the vCenter> `
   -Protocol https -User '<username>' -Password '<password>'

Last updated