When I upgraded some of my Hyper-V hosts from Windows 2008 R2 to Windows 8 I noticed I wanted to do some experiments using the Hyper-v Module for Windows PowerShell. So the first thing I did was install the Windows PowerShell integrated Scripting Environment (ISE) via the Add Roles and Features Wizard on my client. You don’t usually install this on your servers.
We opted to restart automatically if required, so we get a warning this server might restart.
Windows PowerShell ISE is installing
We are informed of our successful installation.
That was easy and no reboot required. So we launch ISE and start testing some commands of our new Hyper-V Module. But that doesn’t do much for us. Nothing happens.
So I try some more commands. But no luck, just some errors that the commands are not recognized or Get-Help can’t find anything of that command. I also not that for non of the Hyper-V commands I have any IntelliSense support.
So it seams the Hyper-V Module for Windows PowerShell is not installed. But I can’t make that out from the Roles Wizard.
I needed to get this going fast so I uninstalled the Hyper-V role and than added it again. That did the trick as now the Hyper-V Module for Windows PowerShell is also installed because I can execute commands
Just install the Hyper-V Module for Windows PowerShell via Features
But after discussing this with Microsoft it turns out that uninstalling and reinstalling the Hyper-V role is not necessary at all. You see when you upgrade a Window 2008 R2 node to Windows 8 it does not install Hyper-V by default as this would change the original install base and they try not to install features you didn’t have before during an upgrade. On a clean install where you add the Hyper-V role you won’t have this issue as the Hyper-V Module for Windows PowerShell is installed by default. What confused me is that I didn’t see an option under Roles to add Role Services to roles as I was used to do in Windows 2008 R2. There is no sub tree or anything.
I was thinking along the same path in Windows 8 but here we can find it in the in “Add Roles and Features Wizard” under Features / Remote Server Administration Tools sub tree. That has two entries. One for Feature Administration Tools and one for Role Administration tools and und the latter we find the Hyper-V Management Tools with Hyper-V Module for Windows PowerShell. Just a tip
You can add it your self after the upgrade by going to Server Manager and starting the Add Roles & Features Wizard.
You go through the normal steps and select to install Hyper-V Module for Windows PowerShell.
We are asked for confirmation of our request actions.
The Hyper-V Module for Windows PowerShell is being installed.
And we have a successful install. We can start scripting on that node right way
Happy scripting!