PowerTip: Personalize Your Copy of PowerShell

PowerTip: Personalize Your Copy of PowerShell

  • Comments 2
  • Likes

Summary: Easily add your user name to your Windows PowerShell console window.

Hey, Scripting Guy! Question I often start multiple Windows PowerShell consoles with different credentials.
          To avoid getting confused, how can I change the window title to my user name?

Hey, Scripting Guy! Answer Use the $host automatic variable, and change the WindowTitle property to the user name:

$host.ui.RawUI.WindowTitle = $env:USERNAME

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Is there anyway to have this happen each time PS is opened?