Freigeben über


Configuring Remote Management of Hyper-V Server - in a workgroup

I have received a number of questions about how to go about setting up remote management of our free Hyper-V server (not the one that is part of Windows).  So I thought I would sit down and write up a set of blog posts to talk about how to do this.  Today I am going to talk about how to remotely manage a Hyper-V server from a Windows 7 desktop when in a workgroup environment.

I am going to assume that you have already installed Hyper-V server and have configured the server name, workgroup name and networking appropriately (in my case – the server name is “Server1” and the workgroup name is “WORKGROUP” – not very original, I know).  Also, I am not going to be talking about the other aspects of setting up a Hyper-V server (e.g. configuring automatic updates, enabling remote desktop, etc…).  I am just focusing on how to get remote management working.

Server Configuration

The first thing you will need to do is to go to the Hyper-V server and run SConfig.cmd (this is configured to run automatically when you log into a Hyper-V server – if you have changed this you can start it manually.  It is in the Windows\System32 folder on the server).  Once you are in SConfig.cmd you will need to:

 

  1. Select option 4 on the SConfig menu (labeled Configure Remote Management)

  2. Then select options 1 (Allow MMC Remote Management) and 2 (Enable Windows PowerShell)

    image

  3. After you enabled Windows PowerShell you will be asked to reboot.

  4. After the reboot – go back into SConfig and select option 4 again

  5. Select option 3 (Allow Server Manager Remote Management)

    1. Note that Server Manager Remote Management requires that you have PowerShell enabled first – so you cannot shuffle this ordering around to try and avoid the reboot.
  6. Select option 5 to Return to main menu

Next, I am going to assume that you are not logged into your Windows 7 computer with the “Administrator” account (which is disabled by default) so you will need to create a second account on the Hyper-V Server.  To do this you will need to go into SConfig and:

  1. Select option 3 (Add Local Administrator)

  2. When prompted for an account name – enter the user name that you are using on the Windows 7 desktop (in my case – “Benjamin”).

  3. You will then be asked for a password – and again you should use the same password as you are using on the Windows 7 desktop (no – I am not going to tell you my password)

    image

Next – to enable remote (but read-only) access with device manager – run this command from the command prompt as well: reg add HKLM\Software\Policies\Microsoft\Windows\DeviceInstall\Settings /v AllowRemoteRPC /t reg_dword /d 1 (once again that is a single command).

image

Finally you will need to restart the server one last time (you can use option 13 on the Sconfig menu).

Desktop Configuration

Now it is time to go and configure the desktop computer. 

The first thing to do is to download and install the Remote Server Administration Toolkit.  You can download it from here: https://www.microsoft.com/downloads/en/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d and install it by just running it and following the prompts.

After you have done this you will need to enable the correct remote management tools.  To do this:

  1. Open the Start menu
  2. Open Control Panel
  3. Select Programs and Features (or just Programs depending on the Control Panel view that you are using)
  4. Select Turn Windows features on or off
  5. Find Remote Server Administration Tools and Check Hyper-V Tools (under Role Administration Tools) and Server Manager under the top level list
  6. Click OK

image

In most workgroup configurations you will not have reliable name resolution for remote computers (i.e. you need to use the IP address).  However – many of the server management tools require that name resolution be working reliably.  If you are using a fixed IP address on the Hyper-V server – you can make this work by editing the “hosts” on the desktop computer (note – you can skip this step if you can ping the Hyper-V server using its name and have it resolve to an IP address correctly):

  1. Open the Start menu
  2. Click on All Programs and then on Accessories
  3. Right click on Notepad and select Run as administrator
  4. Once Notepad has opened, use the File menu to Open… a file
  5. Navigate to the “Windows\System32\Drivers\etc” folder on the system drive
  6. Change the file name option from Text Documents (*.txt) to All Files
  7. Open the “hosts” file
  8. At the end of this file – add an entry for your server.  The format is basically the IP address of the server followed by the name of the server.
  9. Save the file and exit Notepad.

(Here is the hosts file from my desktop – after I have modified it for my server)

image

You will need to enable the use of WinRM to connect to your Hyper-V server.  To do this you will need to:

  1. Open the Start menu
  2. Click on All Programs and then on Accessories
  3. Right click on Command Prompt and select Run as administrator
  4. Type in winrm quickconfig and hit enter.  You will then need to say ‘y’ (yes) to a couple of prompts
  5. Type in winrm set winrm/config/client @{TrustedHosts="RemoteComputerName"} and hit enter
    1. Substitute “RemoteComputerName” with the name or IP address of your Hyper-V server.  In my test environment my desktop computer could not resolve the name of my server – so I just opted to use the IP address.  I could also have edited the hosts file on my desktop and used the server name.
  6. While we are here – we should also open the firewall on the client side to allow us to remotely manage the servers storage by running this command: netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

image

Now you will need to use HVRemote to enable remote management of Hyper-V on the desktop computer.

  1. Download HVRemote from https://code.msdn.microsoft.com/HVRemote/Release/ProjectReleases.aspx
  2. Open the Start menu
  3. Click on All Programs and then on Accessories
  4. Right click on Command Prompt and select Run as administrator
  5. Change to the directory where you saved HVRemote
  6. Type in cscript hvremote.wsf /mode:client /anondcom:grant /firewallhypervclient:enable /mmc:enable and hit enter.

image

You can now open Server Manager on the desktop computer.  To do this:

  1. Open the Start menu
  2. Click on All Programs and then on Administrative Tools
  3. Click on Server Manager
  4. You will be automatically prompted for the name of the server that you want to connect to.

After you enter your server name – you should have full access to manage your Hyper-V server:

image

The only caveat here is that Performance monitor still connects to the local computer.  You can, however, add individual counters from the remote server one at a time.  One thing that tripped me up on this issue is that after entering the server name you need to select the Select counters from computer: drop down and hit enter:

image

Cheers,
Ben

Comments

  • Anonymous
    November 10, 2010
    The comment has been removed

  • Anonymous
    November 10, 2010
    Benedikt - Strange.  Are you logged in as administrator?  Is the firewall running? Cheers, Ben

  • Anonymous
    November 10, 2010
    Unfortunately, current version of RSAT can't be installed on Windows 7 (Ultimate x86) SP1 RC.


Windows Update Standalone Installer

The update is not applicable to your computer.

  • Anonymous
    November 10, 2010
    IL - The secret is that you need to install RSAT first, and then install the SP1 RC release.  Note that you can uninstall SP1, install RSAT and then install SP1 RC again. Cheers, Ben

  • Anonymous
    December 01, 2010
    On my home network name resolution started working as soon as I enabled the file server role and shared a folder over the network. YMMV of course.

  • Anonymous
    December 08, 2010
    Hi Ben I am new to Hyper-V at this point i've install Hyper-V server 2008 on Dell Server. How could we install SBS 2008 server on top of this Hyper-V layer. My plans are to install Linux and SBS 2008 server on this hyper-v server Regards Ayaz

  • Anonymous
    February 04, 2011
    Hi great tutorial on how to set it up. One bit I got caught out on was setting up the extra admin account on the hyper-v server with the same name as the Windows 7 account. It may be best to emphasize that they must be the same name. I was unable to connect via server manager until I had matching accounts. Also for troubleshooting the cscript hvremote.wsf /show /target:SERVERNAME command works great it's how I worked out my issue.

  • Anonymous
    March 28, 2011
    Hi Ben Having an issue with enabling this on my server (sp1/domain member). I have followed the steps in order but every time I try Step 3 - Allow Server Manager Remote Management I am prompted to enable PowerShell first and restart. I have done this many times and seem to be stuck in a loop, any ideas? can't seem to find any other info on this problem. Thanks.

  • Anonymous
    December 31, 2011
    THANKS SO MUCH TRYING TO LEARN THIS IS A MISSION AND YOUR DETAIL HELP IN HOW TO DO THIS IS JUST WHAT I NEEDED!

  • Anonymous
    March 16, 2012
    is there any workaround to manage a hyper-v server 2008 r2 from windows 8? the new hyper-v manager shows incompatible server version :S

  • Anonymous
    March 28, 2012
    Hi I have a small home lan to do training, software eval, etc. So I decided to use my small server to run a virtualised environment. First up was ESXi. Installed and running in 10 minutes. First VM 5 minutes after that. Then Hyper V. Installed in about an hour with Windows core. The next two days was frustration trying to configure it and it still isn't working. Firsat impression; I understand why ESX is the market leader. Steve

  • Anonymous
    May 21, 2012
    Hi Ben! I started testing the Hyper-V Server 8 and have one question - after restart the option 4) Configure Remote Management always indicate failure and need to be reenabled - how to get this enabled after server restart? Thanks, Viorel

  • Anonymous
    July 09, 2012
    Hi! I wanted to ask, if this whole procedure is still necessary for Server 2012 and Windows 8 Client? Thanks Mike

  • Anonymous
    July 13, 2012
    I have tested it . only Hyper-v manager part is working.

  • Anonymous
    July 14, 2012
    First I have to apologize for the previous wrong comment. Second it might be helpful to explain my experience: 1-HVRemote instructions are fine just for using Hyper-V Manager not for Server manager. 2-IF server and client are in domain we don’t need HVRemote just Administrative Tool on client is enough to run server manager for handling Hyper-v R2 remotely. 3-In comparison Hyper-v R2 with Citrix( XenServer) Xen is very easy and perfect

  • Anonymous
    July 14, 2012
    I forgot to say my client computer is Windows 7 professional. I put comment without my name just minute ago.

  • Anonymous
    July 22, 2012
    Mmm. Really easier to use the script. You can find it here: archive.msdn.microsoft.com/HVRemote

  • Anonymous
    September 14, 2012
    The comment has been removed

  • Anonymous
    October 17, 2012
    Ben, Please write a version for Hyper-V 2012 in a standalone environment? Many of the newer commands appear to have changed a bit. Thanks in advance Robert

  • Anonymous
    November 20, 2012
    The comment has been removed

  • Anonymous
    November 21, 2012
    I almost got it to work, but getting Access Denied. Running Hyper-V 2008 R2 on the server, Win 7 Pro x64 client, both are workgroup. On the Hyper-V Manager on my Win 7, I added the server, it connects but says access denied. So any time I try to change hyper-v settings, virtual networks, etc I can't save anything. Any help appreciated!  mrh7184 at gmail dot com    use subject = Hyper-V

  • Anonymous
    November 21, 2012
    Also, any idea on how to do network teaming with Intel

  • Anonymous
    September 24, 2013
    Ben, is there a way to configure this to work is the server is in workgroup and client is on domain? I would like to try this out in our Dev Lab, but putting the server on the domain means I have to jump through hoops with the networking guys so the group policies don't affect the server. All of us in the dev team use win7 laptops on the domain. I want to show the bossman how easy it is and how much time we could save by using snapshots instead of ghosting a drive each time we want to test a setting on one of our previous releases. I've followed the walkthrough step by step, but the instructions are for a workgroup/workgroup relationship. I've used the hvremote script as instructed and set the client to resolve the server's name in hosts. I still get the RPC unavailable message. I get some functionality of the hyperv manager but cannot create new VMs. Is it possible for it to work as I mentioned? Thanks for the time. And, thanks for the awesome walkthrough. Jack Schlee

  • Anonymous
    September 30, 2013
    I can successfully remotely manage my Hyper-V Server 2012 Core in a workgroup environment. I can also remotely manage the disks on the Hyper-V server. I wrote a quick 12-step tutorial (article and video) showing exactly what I did to get this working. pc-addicts.com/12-steps-to-remotely-manage-hyper-v-server-2012-core Hopefully this can help others who found this to be a very frustrating task. -Chris http://PC-Addicts.com

  • Anonymous
    January 22, 2014
    Hi I have a question Can I remotely manage Hyper-V 2012 R2 from pc with installed Windows 7 X64 Enterprice? I tried to do it as from manual for Hyper-V 2008, but there is a problem in cscript (cscript hvremote.wsf /mode:client /anondcom:grant /firewallhypervclient:enable /mmc:enable), it doesn't works(( Also server manager doesn't work, it can be used only to manage only computers that are running Windows server 2008

  • Anonymous
    May 21, 2015
    This is a great article. Thank you!

  • Anonymous
    September 16, 2015
    Hi Great Article Im running on Windows 7 and stuck at this point... cscript hvremote.wsf /mode:client /anondcom:grant /firewallhypervclient:enable /mmc:enable it says unrecognized parameter /mmc:enable

  • Anonymous
    November 15, 2015
    Wonder If you can help, I have followed the aforementioned steps and I still get not communication between the client and Server. Client OS (Windows 8) Server ( Windows Hyper-V Server 2012 R2) When I try managing the server using Hyper-V manager on the Client machine I get an access denied error displayed as there is no communication btw the two. Host machine is Windows 10 Enterprise that is domain Joined. Both Server and Client are running on Host Machine.

  • Anonymous
    January 03, 2016
    Worked great for Windows 8.1 but since the update to windows 10 its broken!!  trying to manage 2012 r2 anyt ideas?

  • Anonymous
    August 02, 2016
    Excellent site. Lots of helpful information here. I am sending it to a few pals ans also sharing in delicious. And certainly, thank you in your effort!

  • Anonymous
    February 27, 2017
    Changes I had to make in this procedure on Hyper-V Server 2016 (free):Different hvremote command:cscript hvremote.wsf /mode:client /anondcom:grant /firewallhypervclient:enable /overrideDifferent approach to WinRT Trusted publishers, do it in Powershell:Set-Item wsman:\localhost\Client\TrustedHosts hv1 -Concatenate -ForceSet-Item wsman:\localhost\Client\TrustedHosts hv1.mydomain.lan -Concatenate -ForceSet-Item wsman:\localhost\Client\TrustedHosts 10.0.0.13 -Concatenate -ForceSet-Item wsman:\localhost\Client\TrustedHosts hv2 -Concatenate -ForceSet-Item wsman:\localhost\Client\TrustedHosts hv2.mydomain.lan -Concatenate -ForceSet-Item wsman:\localhost\Client\TrustedHosts 10.0.0.14 -Concatenate -ForceCheck results with: Get-Item wsman:\localhost\Client\TrustedHosts | fl Value | ftAs you can see, I probably overdid it with 3 definitions for each server, but I kept having problems with FQDN's vs simple computer names, so I got tired and did the above.

  • Anonymous
    March 09, 2017
    what if this option:Then select options 1 (Allow MMC Remote Management) and 2 (Enable Windows PowerShell)isnt available? the machine is up to date with updates

  • Anonymous
    March 09, 2017
    Also noticed when using te script cscript hvremote.wsf /mode:client /anondcom:grant /firewallhypervclient:enable /mmc:enable, i am getting a error Unrecognised parameter /mmc:enable