VMware Cloud Community
danh2010
Enthusiast
Enthusiast

Can you auto connect to vCenter at startup?

I only have 1 vCenter and I'd like to be able to auto connect to it when I launch my powercli program.

Is this possible to add code for this in the Initialize-PowerCLIEnvironment.ps1 file?

Thanks,

Dan

Thanks, Dan
Tags (2)
Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

I wouldn't do that in the PowerCLI initialisation script, because that is updated when you install a new version.

A better place imho, would be to place the Connect-VIServer in your PowerShell profile.


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

Reply
0 Kudos
danh2010
Enthusiast
Enthusiast

ok, no problem on that.

Thanks.

Thanks, Dan
Reply
0 Kudos