Uncategorized

Connect-VIServer usability goodie – the new Menu parameter

Greetings to all PowerCLI users out there!

In this blog post, I want to show you one of the usability improvements that we introduced in the latest PowerCLI release. Namely, the new –Menu parameter of the Connect-VIServer cmdlet.

The functionality of this parameter is simple and useful – it lets you select a server from the ones you use most often. Here’s an example:

PS C:\WINDOWS\system32\windowspowershell\v1.0> Connect-VIServer -Menu
Select a server from the list (by typing its number and pressing Enter):
[1] aevrov-mvc-3.vmware.com
[2] localhost
[3] S10
[4] vvvvc41-ga.pc
[5] 10.23.37.6
[6] vc41-ga.pc
[7] 10.23.113.103
[8] 10.23.33.0
[9] aevrov-mvc-2.vmware.com
[10] S9
6
WARNING: There were one or more problems with the server certificate:
 
* The X509 chain could not be built up to the root certificate.
 
* The certificate's CN name does not match the passed value.
 
 
Name                           Port  User
—-                           —-  —-
vc41-ga.pc                     443   powershell
 
 
PS C:\WINDOWS\system32\windowspowershell\v1.0> Get-VM … 

 

In the example above, I called Connect-VIServer specifying that I want to see the list of recently connected servers and choose one of them. The servers are listed with numbers in front of them. I chose server ‘vc41-ga.pc’ by typing its number (6) and pressing enter. After that, PowerCLI connects to the server and I can continue working with it as usual. That’s all!

Now, let’s look at some details. The list is currently limited to the 10 servers that you use most often. When a server becomes one of the top-ten, its position is preserved until it drops out of the list. Whether a server is part of the top-ten list depends on: (1) how many times you have connected to it and (2) how long ago you have connected to it.

I hope this new PowerCLI feature is useful for you. I use it very often myself.

Regards,

– Angel Evrov, MTS at VMware