Home > Microsoft, Remote Desktop, Windows Server > Prompting Server name on Server Core Command Prompt

Prompting Server name on Server Core Command Prompt

Lets say you got or you plan to deploy several Windows Server 2008 Server Core installations and you are connecting to them by using the Terminal Services Remote Programs. So you get a default simple prompt. Using the following tip you can change the default prompt and add a servername. Open the registry and navigate to the following key:

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

Look for a key called Prompt, if it’s not there then use the following settings to create one:

Value Name: Prompt
Data Type: REG_EXPAND_SZ
Value Data: $_Server:[%servername%]$_Username:[%username%]$_$T$_$p$g

Here are some special codes you can also 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)

-Eric

Advertisements
  1. Kredyt
    November 19, 2011 at 12:29 pm

    Nice topic i think the same about it.

  2. Kredyt
    November 19, 2011 at 1:11 pm

    I needed that, thx a lot mate.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: