I have been spending some time working with the free version of Hyper-V server recently (available here: http://www.microsoft.com/en-us/server-cloud/hyper-v-server/default.aspx). It is lots of fun to see just how much you can do with this free software (hint: you can do everything you can with Hyper-V on a full installation of Windows).
However – one thing that I realized quickly was that I did not like the default login experience. Normally, when you login to a Hyper-V server you will get a command prompt and a running instance of the Server Configuration tool:
This is all fine and good when you are first setting the server up. But after then it gets a bit annoying. The reality is that most of the time you will be managing Hyper-V remotely – from another Windows computer. The only reason why you would want to login to a Hyper-V server directly is because something has gone wrong, and you need to do some troubleshooting.
Now, when it comes to troubleshooting a Hyper-V server – there are really only two things I want:
- I want to know if all of my virtual machines are okay.
- I want a PowerShell window so I can use the Hyper-V cmdlets to dig in deeper if I need to.
Having PowerShell launch by default is quite easy. Just launch PowerShell from the command prompt (type in “PowerShell” and hit enter) and then run this command:
Set-ItemProperty "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\WinLogon" Shell ‘PowerShell.exe -WindowStyle maximized’
Now you will get a PowerShell window instead of a command prompt whenever you login. But I wanted a bit more than that. To get a better experience – I needed to create a PowerShell profile. To create the profile I ran these commands:
And put the following information into the profile file:
The result is that when I login to my Hyper-V server now, I am presented with a full screen PowerShell window and a listing of my virtual machines straight away. Very handy.