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:
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.