Would you please help me to understand how we can connect to different vcenter using PowerShell script?
I started with this lines, unfortunately each time I add a vcenter to this script it xonnect to last one on the list:
#Initialize PowerCLI
add-pssnapin VMware.VimAutomation.Core
# vCenter Login
$vCUser="domain\user"
$vCPass="Password"
# LIST OF vCenters
$vCenterIP = "x.x.x.x"
$vCenterIP = "x.x.x.x"
foreach ($IPAddress in $vCenterIP){
# Connessione a vCenter
Connect-VIServer $IPAddress -User $vCUser -Password $vCPass -port 443
}