How to I set the title of my Console Window?

How to I set the title of my Console Window?

  • Comments 6

PSMDTAG:FAQ: How do I set the title of my console window?  ANSWER: $Host.UI.RawUI.WindowTitle = "PowerShell ROCKS"

Jeffrey Snover [MSFT]
Windows PowerShell/Aspen Architect
Visit the Windows PowerShell Team blog at:
Visit the Windows PowerShell ScriptCenter at:

Leave a Comment
  • Please add 3 and 1 and type the answer here:
  • Post
  • The PowerShell team's blog posted this great script on their blog today.
  • nice.

    now what if you want that change to be persisted across sessions?

    similarly, what if i want to change the prompt function, and then have it retain this new value next time i open a powershell console?

  • Find profile.ps1 (can't recall where it lives) and add that line to your prompt function.  Make any additional changes, then save and restart powershell.
  • default Profile files reside in
  • thank you eric and thank you monadblog person.

    asking questions on other peoples blogs is so much easier than just reading the help documentation myself. ;-)
  • The location of the profile is stored in $profile so you can use that (i have an alias that does nothing more than gvim $profile).

    Also, given how common the request is, I'd ask Jeffrey to (pretty-please) also include in this post a prompt function that sets the title to include pwd.

    More elaborate prompt functions are certainly possible, of course - for example
Page 1 of 1 (6 items)