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
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
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
Excellent thank you that works perfect.
I setup a profile.ps1