Setting the Windows Terminal Tab to vCenter Name with PowerShell

Quick one. Today, I was working on some PowerShell using one of my favorite new Windows tools, Windows Terminal.

I’ve written about it a bit in the recent past:

I often will connect to multiple vCenters, but even more frequently will have multiple vCenters connected but in separate sessions or tabs:

Four tabs, four vCenters. And I never clicked on the one I meant to be cause they were all called PowerShell. In a fairly recent release, Windows terminal added the option to rename the tabs:

Which is cool, but I don’t want to have to type my vCenter name again–and what if I screw it up and label the wrong one!!? We script to remove the chance of that, right?

Well there is an operation where you can rename the title:


Set that to a new name, but I noticed it really only renamed the window, not the tab itself. As it turns out, this will only rename the tab if a specific parameter is added to your profile. So first, click on the top dropdown then settings

Under your PowerShell profile you will see something like this:

add “tabTitle”: “PowerShell” below source (don’t forget to add a comma after the source line:

Save it. Now if you set that variable, your tab will rename!

To set it accurately:


$Host.UI.RawUI.WindowTitle = $

And repeat!:

Ah much easier to manage.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.