Home PowerCLI Change Your PowerShell Window Titlebar to More Easily See What You Are Running

Change Your PowerShell Window Titlebar to More Easily See What You Are Running

by Brian

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:

https://github.com/vtagion/Scripts/blob/master/Set-WindowTitle.ps1

 

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More