How to set the PowerShell Window Title

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:

Be the first to comment

Leave a Reply

Your email address will not be published.