Changing the default shell of Windows Server 8 Core

I have to admit, I’m a bit torn with Windows 8 in general. I’m absolutely in love with Windows Server 8’s new Powershell functions and management console, but despise the lack of a start menu. Luckily Powershell has gotten so powerful in Server 8, I hope to not spend much time in the Gui.

Back on topic: By default when you install Windows Server 8 Core and log into the console, you get presented with a CMD prompt… Weird eh?

Now most administrators will simply type powershell and perform their tasks, but I personally feel this is the wrong way around. Powershell should launch first, and if cmd is really needed you could call it inside of powershell!

Being the pedantic individual that I am, I set about changing Server Core to auto-load powershell on login. This was quite an easy task and I’ve documented it below for other users to follow if they wish:

The shell in Windows Server 8 is configured under the following key:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonAlternateShellsAvailableShells

Under this key, on Server 8 Core, you will see the following entry:

And that’s where our CMD is coming from! This is another one of these blasted TrustedInstaller Keys. So if you want to change it, you’ll need to take owership of the key, then assign full control to your user account.

So the first thing I did was create a value lower than 30000 and assign it to powershell, but this didnt work.

Unusually here the weighting system is highest wins, rather than lowest which is a little counter intuitive, but I digress.

I added a new key 90000 (i’ll explain this later) and entered the path to powershell as below:

Now Once I restarted, Powershell is the automatic shell of choice:

Bonus 1: Why 90000?

Well if you look at a Server 8 Gui server, you’ll notice that Explorer.exe wins the selection by being 60000:

So I added another 30000 and bob’s your uncle.

If you asked yourself, “hmmm, could i also do this on windows server 8 where the gui is installed?the answer is yes.

And if you asked yourself  “hmmm, could I also do this on Windows 8?the answer is no.

And if you also asked yourself “hmmm, could i assign these in a users key instead of local machine?the answer is no.

Related Posts

Viewing VMware Unified Access Gateway statistics w... Is this thing still on? Good! The VMware Unified Access Gateway really is a wonderful device. With a quick deployment of an OVF...
New Module: Creating an RDP file password with Pow... Here's something that is surprisingly tricky to automate in this day and age. Creating a password and storing it in an RDP file. I'm not here to debat...
Dealing with multi numbered versions in powershell... So here's a quick little blog about something i discovered in powershell while googling today. Lots of vendors like to use version numbers includin...

5 Comments About “Changing the default shell of Windows Server 8 Core

  1. Pingback: vNiklas Virtualization blog » Updated: Change to Powershell console in Windows 2012 Core

    1. Andrew Morgan

      Hi Thomas, you’ll notice my post was released a number of months ago before the release candidate. As a Citrix guy I’m well aware of the shell key and when I tested that key with the beta candidate, it didn’t work.

      my post also goes into the logic behind the shell decision via the registry, so I’ll be leaving it intact rather than just brute forcing it with the shell key.

        1. Andrew Morgan

          Hey Helge, thanks for dropping by!

          That article was a while ago now, but I was interested in how it was being done, rather than brute forcing it with the shell key… It actually didnt occur to me to try it.

          Consequently I haven’t tested the shell key, does it work?



Leave a Reply