Network Administrator Knowledgebase

Feb 7 2008   4:51PM GMT

Change Default Prompt in Windows Server 2008 – Server Core

Michael Khanin Michael Khanin Profile: Michael Khanin

If you are planning to deploy Windows Server 2008 – Server Core installations, I think you should use the following tip, that I’ve found few days ago on very good blog, blogs.technet.com/aralves.

Think about you have more than one Windows Server 2008 – Server Core box and you are connecting to them by using the Terminal Services Remote Programs. What you get? Just a simple prompt. By using following tip you can change the default prompt and add at least the servername. To do this, simple open the registry editor and navigate to the following key:

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

Find 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 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 :)

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: