Welcome to TechNet Blogs Sign in | Join | Help

Syndication

News

  • My Twitter
  • Windows Server 2008 - Server Core - Change Default Prompt

    If you are planning to deploy Windows Server 2008 - Server Core installations in your network I would strongly advise you to use the following tip.

    In all my Server core installations I change the default prompt to something like this:

    image

    Imagine you have more than one Server core box and you are connecting to them by using the Terminal Services Remote Programs. Guess what you get, yes just a prompt and if you don't add more information than the path you will have a hard time to now on which machine you are executing commands, therefore do change the default prompt and add at least the servername. How can you do that?

    Quite simple open the registry editor, yes there is one on server core too, and navigate to the following key

    HKLM\System\CurrentControlSet\Control\Session Manager\Environment

    There should be a key called Prompt, if it's not there create one using the following settings.

    Value Name: Prompt

    Data Type: REG_EXPAND_SZ

    Value Data: $_Server:[%servername%]$_Username:[%username%]$_$T$_$p$g

    With this value you get the prompt as shown in the above picture.

    Here are some of the special codes you can use:

    • $A - & (Ampersand)
    • $B - | (pipe)
    • $C - ( (Left parenthesis)
    • $D - Current date
    • $E - Escape code (ASCII code 27)
    • $F - ) (Right parenthesis)
    • $G - > (greater-than sign)
    • $L - < (less-than sign)
    • $N - Current drive
    • $P - Current drive and path
    • $Q - = (equal sign)
    • $S - (space)
    • $T - Current time
    • $_ - Carriage return and linefeed
    • $$ - $ (dollar sign)

    Now you will always know on which server you are working even when connecting through remote apps. :)

    Published Friday, February 01, 2008 9:43 PM by aralves

    Comment Notification

    If you would like to receive an email when updates are made to this post, please register here

    Subscribe to this post's comments using RSS

    Comments

    # MSFT News Aggregator &raquo; Windows Server 2008 - Server Core - Change Default Prompt @ Friday, February 01, 2008 7:36 PM

    PingBack from http://msft.starsports.info/msft/windows-server-2008-server-core-change-default-prompt/

    MSFT News Aggregator » Windows Server 2008 - Server Core - Change Default Prompt

    # Handig in Server Core: Zet de naam van de server in de command prompt @ Sunday, February 03, 2008 4:16 AM

    Mijn collega Arlindo had een handige tip over hoe hij bij elke Server Core installatie de command prompt

    Tony Krijnen

    # Will the real Core please stand up? @ Monday, February 11, 2008 3:01 AM

    Imagine a huge data center.&#160; Rack and racks of web, music and video servers all tied to racks and

    Keith Combs' Blahg

    # Remotely managing your Server Core using WinRM and WinRS @ Saturday, February 23, 2008 5:19 PM

    I've already shown you how to remotely manage your Server Core installations of Windows Server Core using

    The things that are better left unspoken

    # Building a Failover Cluster with Server Core Part 1 @ Monday, March 31, 2008 10:38 AM

    During the Dutch Launch event I presented about Windows Failover clustering and I also prepared some

    [MSFT-BE] Arlindo's Blog - IT Pro Evangelist

    Leave a Comment

    (required) 
    required 
    (required) 
    © 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
    Page view tracker