PowerShell module for hyper-v

PowerShell 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 discuss how can you install the modules correctly 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

image

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.

image

[install hyper-v module13[4].png]

[install hyper-v module15[4].png]

Once the installation 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)

image

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

image

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

image

After that import the Hyper-V modules,

image

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

image

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

image

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s