Remotely administering Hyper-V with WinRM

Hyper-V in Windows 10 and Server 2016 uses WinRM for remote management.

In order to remotely manage a machine that is not in the same domain as the client, the server's name or IP address must be added to TrustedHosts on the client and CredSSP authentication must be configured on both machines.

On the server:

Enable-PSRemoting # On by default in Windows Server.
Enable-WSManCredSSP -Role server

On the client:

$HVHost = "172.29.203.25"
$TH = Get-Item WSMan:\localhost\Client\TrustedHosts | select -ExpandProperty value
if ( $TH.Length -eq 0 ) 
    { $TH = $HVHost } 
else
    { $TH += ",$HVHost" } # A comma-separated list.
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $TH

Enable-WSManCredSSP -Role client -DelegateComputer $HVHost

From Hyper-V Manager, connect to server. Enter the server's name or IP address and click the Set User button to enter an administrative username and password.