pt073
Contributor
Contributor

Auto login when clicking VMware vSphere PowerCLI icon.

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

0 Kudos
2 Replies
LucD
Leadership
Leadership

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

0 Kudos
pt073
Contributor
Contributor

Excellent thank you that works perfect.

I setup a profile.ps1

0 Kudos