Setting the Title of the Command Prompt Window


I was wondering how you change the title of the Command Prompt window.  A little searching found that Scott Hanselman had answered this question here.  All you have to do is type "title <your text>" and press Enter to change the title of your Command Prompt window.  It should look like the following:

Note that if you are running Console2 to host your command prompt window, it works just fine.

Finally, if you want to do the same thing in PowerShell, just execute the following command:

[System.Console]::Title = "Running as User12345"

Note that you have to have the quotes around the text to which the title should be set; they may be single or double quotes.

Rob

 

 

 

Comments (9)

  1. Maximus says:

    Did you hear about ConEmu?

    http://www.hanselman.com/…/ConEmuTheWindowsTerminalConsolePromptWeveBeenWaitingFor.aspx

    And there was similar question about changing tab title: superuser.com/…/139371

    ConEmu's solution is using ANSI X3.64 escape sequences. But title will work too.

  2. I think you sold me, @Maximus.  I just downloaded it and started playing with it.  Beautiful so far.  Thanks for sharing!

  3. Sturmey says:

    I realize this was around for a few years now, but I just needed this and found your post. We often need windows running ping checks, and putting a title helps differentiate which is which.

    This is quick and easy. Thanks.

  4. Atish Lahiri says:

    Stilluseful in 2015 – thanks!

  5. hey... says:

    Do you know how to do it permanently?

  6. Derin says:

    Thanks for this mate.

  7. Maciej says:

    Good solution,

    but I have a question: is there a way to keep the window unchangeable? The moment we run a console program , TSM, it overwrites the window title name.

    Something I could put in start.bat:

    cd <path>

    title <name of the instance>

    Do_something_to_keep_window_unchanged

    <name of the appliccation>

    I am using Windows Server 2008 R2 Enterprise

  8. Stan says:

    hey…

    If you want to permanently change the title, you need to open the command prompt from a short cut (from your taskbar, desktop, etc).

    Right click on your cmd.exe shortcut and select properties. Under Shortcut tab, Target should read something like “%windir%\system32\cmd.exe”

    Simply modify Target to: %windir%\system32\cmd.exe /K “title YOUR_TITLE_HERE”

    Make sure the “title” command is in quotes. Now anytime you open that shortcut, the Title will be changed.

    Hope this helps.

  9. Santosh says:

    nice example, its resolved my issue with in 10seconds

Skip to main content