Can not get Hyper-V VM info on remote host

Jim 1 Reputation point
2021-06-13T23:26:42.423+00:00

I'm trying to set up remote Hyper-V management following the guide here1 but failed. When I try to connect to the remote server, it says "An error occurred while attempting to connect to server "XXX". Check that the Virtual Machine Management service is running and that you are authorized to connect to the server."

To figure out the reason, I have tried

  1. Perform Get-VM -ComputerName XXX -Credential XXX\YYY, it says "Get-VM : Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running."
  2. Perform Invoke-Command -ComputerName XXX -Credential XXX\YYY -ScriptBlock { Get-VM }, it returns the expected results.

It seems weird that Get-VM can run with Invoke-Command but fails on its own. Any guidance would be appreciated.

The Hyper-V host and client are both running Windows 10 Pro of build 19043.1055.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,546 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Yuhan Deng 3,761 Reputation points Microsoft Vendor
    2021-06-14T05:47:33.277+00:00

    Hi,
    The invoke-command returns everything it gets, including the errors.
    Also have you tried restarting VMMS service on your VMs? It seems that the VMMS service is somehow related to it according to the second paragraph.

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Yuhan Deng 3,761 Reputation points Microsoft Vendor
    2021-06-15T02:22:34.653+00:00

    Hi,
    I did some research, and I found this, you might want to take a look:
    https://hungdoan.com/2019/12/25/hyper-v-encountered-an-error-trying-to-access-an-object-on-computer/
    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Also there's this article that provided several solutions that you might want to try:
    https://social.technet.microsoft.com/Forums/en-US/0a29c671-b640-4c2d-954f-622b25f65ad9/hyperv-encountered-an-error-trying-to-access-an-object-on-computer-object-was-not-found?forum=win10itprovirt

    Hope this will help.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Yuhan Deng 3,761 Reputation points Microsoft Vendor
    2021-06-17T06:28:27.367+00:00

    Hi Jim,
    Based on my understanding, your main concern is to connect to another host using hyper-v manager, is that correct?
    If it’s correct, may I ask if the two hosts are in the same domain/workgroup? Also I want to know the OS system of the hosts.

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  4. Yuhan Deng 3,761 Reputation points Microsoft Vendor
    2021-06-23T02:36:56.85+00:00

    Hi Jim,
    To add or remove computers from a domain/workgroup using powershell, you can refer to this article:
    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-computer?view=powershell-5.1

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments