How to set the PowerShell Window Title

26 October 2020

When running multiple scripts, either at the same time, or sequentially, it’s nice to know which script is running.  An easy way to do this, it to set the title of the PowerShell window, when the script is running.  To do this, simply ad the below code to the top of your PowerShell script:

$host.ui.RawUI.WindowTitle = "This is my script title"

Now you’ll notice the title is set, as you can see in the below example:

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.