VMware Cloud Community
allencrawford
Enthusiast
Enthusiast

Connected vCenters in title bar missing in PowerCLI 5.0.1

Has anyone else noticed that in PowerCLI 5.0.1 it no longer shows which server(s) you are connected to in the title bar?  Is there a simple workaround short of me writing my own Connect-VIServer function (no big deal if I have to, but kind of a nice feature to lose in my opinion).

Reply
0 Kudos
8 Replies
LucD
Leadership
Leadership

Confirmed.

Can be changed with

(Get-Host).UI.RawUI.WindowTitle = $defaultVIServers[0].Name


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

RvdNieuwendijk
Leadership
Leadership

If you have connected more vCenter or ESXi servers at the same time, you can use the following modification of Luc's script to get the pre version 5.0.1 behaviour:

(Get-Host).UI.RawUI.WindowTitle = "VMware vSphere PowerCLI 5.0.1 - "+[string]::Join(',',$defaultVIServers)


Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
hharold
Enthusiast
Enthusiast

Is it correct that these solutions are rather static?

Within PowerCLI 4.x the title bar would change when connecting or disconnecting to/from vCenter instances.

Would be very nice to have the PowerCLI 5 title bar to be just as dynamic.

Regards,


Harold

Reply
0 Kudos
RvdNieuwendijk
Leadership
Leadership

Hi Harold,

you are right. These solutions are rather static. The new implementation of the Connect-VIServer and Disconnect-VIServer don't have an option to get the old behaviour, which I also liked more. Maybe VMware will change it back to the old behaviour in the next version, if complain enough. Smiley Wink

Otherwise we will have to write proxy functions.

Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
hharold
Enthusiast
Enthusiast

Hi Robert,

Thanks for the reply.

I liked the feature as well, and it is a pitty they removed it.

Let's start complaining 😉

Regards,

Harold

Reply
0 Kudos
LucD
Leadership
Leadership

Until the PowerCLI Team brings back the old title bar, you can use proxy cmdlets as I described in my Proxy cmdlet revisted: Connect-VIServer and Disconnect-VIServer post.


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

Reply
0 Kudos
RvdNieuwendijk
Leadership
Leadership

You can also use the proxy functions from my blog post: PowerCLI 5.0.1 Connect-VIServer repaired.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
allencrawford
Enthusiast
Enthusiast

Ha ha.  I guess I'll join the link-to-your-own-blog club now.  We (me and mattboren) wrote these functions the day I started this thread but just got around to composing a blog post a few hours before Luc posted his own.  Guess I should've finished it over the weekend like I originally planned!

http://vnugglets.com/2012/01/show-currently-connected-vcenter.html

We took a different angle than you and Luc, mainly because I've had my own functions for Connect- and Disconnect-VIServer for a while now so just added the new "Change-TitleBar" function to them.  I guess it has the advantage of not having to worry about new functionality being added to the default cmdlets, but other than that is just a simple fix while we hope the PowerCLI crew brings this functionality back.

Reply
0 Kudos