So... how do I use Powershell against my Hyper-V server?

Jul 11, 2012 at 12:13 AM
Edited Jul 11, 2012 at 12:17 AM

I managed to get the library installed, I think. So now what? How do I connect to the hyper-v server from Powershell on my desktop? Is that what I even need to do or is ALL this done on the server? All I've been trying to do the last few days is view a list of VMs on my hyper-v server but ALL the instructions I find are so vague and incomplete I never manage to accomplish anything.

I did all the steps in the last reply on this page: but honestly I don't even know what that did or why I had to do it. 

I suppose IF there were any documentation here, that is where it would tell me how to connect to my hyper-v server over the LAN using Powershell and the library it boasts.

Can anyone give me clear or explicit instructions on how to connect to the server? Or, maybe a link to a how-to that is complete and there are no dead ends?


I have this command: 

Start-VM –Name “[VM Name]”

...from this URL:

...but as you can guess when I type that in my Powershell on my desktop I get "Start-VM : A parameter cannot be found that matches parameter name 'Name'."

...I'm guessing, because I'm not yet connected to the Hyper-V server :\

Jul 11, 2012 at 12:56 AM
Edited Jul 11, 2012 at 12:57 AM

Perfect example. After posting the above SOS, I found this page ( where, upon reading the intro I began to get very excited only until I got to the part where they said "If you want to see which virtual machines exist on your Hyper-V server, use the following command:



As soon as I saw that lonely command all by itself I knew this wasn't going to help me. And how is it that no one ever seems to start out by saying "in order to get a list of the virtual machines on a particular HOST, you must first CONNECT TO IT...". :(

Sep 5, 2012 at 10:44 PM

The remote Hyper-V server should have WMI Remote Administration enabled (see below).

Suppose you have two machine - one with Windows 7, and another with Windows Server 20008 R2 and Hyper-V installed and some VMs running. Here are basic steps that you need to follow:

Install PSHyperV library on the Windows 7 machine.

Enable WMI remote administration on Windows Sever 2008 R2 machine by running the following command from CMD console:

      netsh firewall set service type=RemoteAdmin profile=all

Now on your Windows 7 machine run PowerShell console elevated (as Administrator), load HyperV module and execute Get-VM command against the remote server:

PS C:\Windows\system32> Import-Module D:\hyperv\HyperV.psd1

PS C:\Windows\system32> get-vm -server Server-01

Host                      VMElementName             State        Up-Time (mS) Owner
--------                  -------------             -----        ------------ -----
Server-01                 Win-RQ539            Running      1048716623
Server-01                 WIN-MU733             Running      74205949
Server-01                 vm1                       Running      1031760270

Note that another link you referring to,, is for a different PowerShell Hyper-V management module, the one that ships with Windows Server 2012. Windows Server 2012 has WMI remote management enabled by default so the remote Hyper-V management commands from either built-in module or the module from this project should just work.