VMware Cloud Community
pt073
Contributor
Contributor
Jump to solution

Auto login when clicking VMware vSphere PowerCLI icon.

Hello,

Quick question is there a config file or a way for me to have powershell cli automaticly "connect-viserver"  when I open the "VMware vSphere PowerCLI" icon.

thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

There are several ways of doing that.

The best way, imho, is to add the Connect-VIServer cmdlet to one of the PowerShell profile files.

Just add a line to the file. Provided you are using an authorised account, you can just do

Connect-VIServer -Server MyServer

I would suggest to use the Current User profile, that way the Connect-VIServer will only be executed when you start PowerCLI


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

There are several ways of doing that.

The best way, imho, is to add the Connect-VIServer cmdlet to one of the PowerShell profile files.

Just add a line to the file. Provided you are using an authorised account, you can just do

Connect-VIServer -Server MyServer

I would suggest to use the Current User profile, that way the Connect-VIServer will only be executed when you start PowerCLI


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

Reply
0 Kudos
pt073
Contributor
Contributor
Jump to solution

Excellent thank you that works perfect.

I setup a profile.ps1

Reply
0 Kudos