PowerTip: Change the PowerShell Console Title

PowerTip: Change the PowerShell Console Title

  • Comments 5
  • Likes

Summary: Learn how to change the Windows PowerShell console title.

Hey, Scripting Guy! Question How can I change the title of the Windows PowerShell console?

Hey, Scripting Guy! Answer One way to do this is to use the WindowTitle property from $host.ui.rawui, as shown here.

$host.ui.RawUI.WindowTitle = "Changed Title"

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • This should be a cmdlet!


  • I guess I want to change it after the console is open. For example, when I connect to Azure, I want to indicate that in the title bar. This command does not error out but it does not change the value either.

  • function change-title {
    param ( [string] $newtitle)
    $host.ui.RawUI.WindowTitle = $newtitle + " - " + $host.ui.RawUI.WindowTitle;

    not a cmdlet, but quick and easy function

  • $host.ui.RawUI.WindowTitle = "Changed Title" - > fantastic it worked for me , thnx a lot :-)

  • Thanks. This tip also worked for me. Just one question. How do you make this permanent?