I'm trying to set up remote Hyper-V management following the guide here[1] 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
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."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.


