Monday, April 16, 2012

Remote Hyper-V Management from client in different Domain

Recently the employees of Yellow & Red migrated the laptops to another domain. However the Hyper-V was left as-is and still run in the Yellow & Red domain. The problem is that you cannot manage the Hyper-V using the standard Hyper-V Remote Manager as you are not in the same domain.

You need to configure a lot of stuff. Thanks to John Howard we just need to run a few scripts.

Follow these steps:

Download: HVRemote.wsf from the Hyper-V Remote Management Configuration Utility

On Hyper-V server execute the following commands:

cscript hvremote.wsf /add:domain\user

On Client: (in elevated mode)

cscript hvremote.wsf /mmc:enable

cscript hvremote.wsf /anondcom:grant

Important note for the next steps:
ServerComputerName should be the name as shown in Hyper-V server, run “sconfig.cmd” and see “Computer name” at number 2. Otherwise you’ll get issues trying to query the root\cimv2 WMI namespace).

Add credentials to your credential store:
cmdkey /add:ServerComputerName /user:ServerComputerName\UserName /pass

- add a line to hosts file. In my case I cannot resolve ServerComputerName.

192.1.3.4   ServerComputerName

To test the communication run this line on the client:

cscript hvremote.wsf /show /target:ServerComputerName

You should now be able to connect to your Hyper-V server.

3 comments:

  1. Just attempted to do this - there is no /mmc option in hvremote.wsf - was it replaced with a different option?

    ReplyDelete
  2. Does this work also without a domain trust?

    ReplyDelete

Note: Only a member of this blog may post a comment.