Display Your Computer Name on Server Core

In my Administrator’s Guide to Server Core Commands article on AdminPrep I showed you how to display the time on the command prompt of your Server Core command window.  I just read that Daniel Petri has some other cool shortcuts on what you can display on the command window of Server Core.  The one that I really like is the computer name.  If manage multiple Server Core servers then you already know how difficult it can be to manage different sessions…especially since they all look the same.

To display the computer name (among other things listed on Daniel’s article) you need to modify the registry.  If you don’t already know please modify the registry carefully

1. Navigate to the HKLMSystemCurrentControlSetControlSession ManagerEnvironment key.

2. Create or Edit a key called Prompt (it should be an Expandable String Value)           image

3. Add the the following for the data – $_Server:%computername%_$p$g


You will have to log off and log back on to see the change but once you do it is a pleasant addition to the command window.  Daniel’s example shows how you can the Date, Time and User…very cool so make sure you check it out.

Leave a comment