12-03-2011 10:29 AM
Susantha Silva
PowerShell module for hyper-v
PoweShell is a very powerful tool you can use across Microsoft technologies. Microsoft will keep on adopting and improving this technology every time. Right now PowerShell module ver 2 for HYPER-V has been released. This article will dicuss how can you install the modules correctley into your Windows 2008 R2 server. Please note this is for Windows 2008 R2 only!
First get the PS modules from the codeplex web site. Url is here

Download the zip file to a root drive or any preferred area and unzip. Once that complete locate the “install.bat” file and execute it with administrator privilege.

![[install hyper-v module13[4].png]](http://lh4.ggpht.com/_aGfQw0MAqWw/TXrOzPep3nI/AAAAAAAABuM/Xumx775oXuc/s1600/install+hyper-v+module13%5B4%5D.png)
![[install hyper-v module15[4].png]](http://lh6.ggpht.com/_aGfQw0MAqWw/TXrO4zHMsII/AAAAAAAABuc/76buJNht6uE/s1600/install+hyper-v+module15%5B4%5D.png)
Once the instllation completed, we’ll move the unzip folder in the PS module folder located in the root drive, (I’ve rename the folder as HyperV and copied to the modules folder)

Now we can import this to the system by excuting through PowerShell. Open the Powershell and try to run “import-module HyperV” you’ll grant with a error message

We need to enable the execution permissions to import the module, please follow the instruction mention in below screenshot,

After that import the Hyper-V modules,
Now when that complete we can run the command “Get-Command –Module hyperv” to list down the available commands,

Now we have plethora of task can be automated combing these commands, it’s all about your imagination
