If you are like me, at any given time you probably have at least a few PowerShell sessions up on your desktop. I’ve been so bad as to have more than 15 up at times (although rarely). One thing I started doing to help myself out was to change the title of the PowerShell Session Windows so that I could quickly and easily find the desired session.

I presented on this at the Orlando VMware User Conference in 2016 and many people wanted the module I showed off (it had a few of my regularly used functions in it). I gave it to those who asked, but I realized about a year later that I hadn’t shared it with the masses. Unfortunately, time got away from me and then I couldn’t track it down, so I rewrote it this weekend for some work I was doing (you’ll see it’s nothing crazy and only took a few minutes). But here it is, and I hope it helps you all!

You can use it like this:
Set-WindowTitle “Batch VM Creation Script”

Set-WindowTitle -Title “Adding New-Hires To Active Directory | 50% Complete”

You can add percentages and counts in easily to show progress. Team this up with the function I posted about yesterday ( https://www.brianjgraf.com/2018/07/09/get-notifications-during-long-running-powershell-scripts/ ) to really make things rock!

You can grab the function here:



Written by


Brian Graf is a Sr. Technical Marketing Manager for VMware Cloud on AWS at VMware. He has also worked on ESXi Lifecycle, PowerCLI Automation and been the Product Manager for vSphere DRS and HA. Brian is co-author of the PowerCLI Deep Dive 2nd edition book and a Microsoft MVP.

You May Also Like to Read