Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

But there is, in my previous example you call Connect-VIServer once, and you connect to all 3 vSphere servers.

To avoid being prompted for credentials, you can store the credentials for all 3 vSphere servers in a VICredentialStoreItem.

# Do this only once to create the credential store items

New-VICredentialStoreItem -Host vc1 -User uservc1 -Password Password1!

New-VICredentialStoreItem -Host vc2 -User uservc2 -Password Password2!

New-VICredentialStoreItem -Host vc3 -User uservc3 -Password Password3!

# Connect to 3 vCenters in 1 call

Connect-VIServer -Server vc1,vc2,vc3

Or did you see something different in your tests?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference