So, you forgot to enable RDP on your HyperV Server.

You have HyperV installed somewhere… somewhere you are not currently at. Oh, and you are on a domain currently, and it is on in a workgroup and you cannot use HyperV Manager to connect. What do you do?

The first thing to do is to enable and configure Windows PowerShell remoting. To do this, use the Enable-PSRemoting cmdlet.

  1. Open a Powershell Terminal with “Run as Administrator” and type Enable-PSRemoting.

Next we need to add the DNS name (or IP if you really need to) to TrustedHosts in WINRM.

  1. winrm set winrm/config/Client ‘@{TrustedHosts=”fully_qualified_server_name, server machine name”}’

After that, we connect to the remote HyperV server. The method below will prompt you for credentials.

  1. EnterPSSession hostname Credential (GetCredential)

Next, we enable Remote Desktop Connections.

  1. Enable Remote Desktop
    set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server’-name “fDenyTSConnections” -Value 0
  2. Allow incoming RDP on firewall
    Enable-NetFirewallRule -DisplayGroup “Remote Desktop”
  3. Enable secure RDP authentication
    set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’ -name “UserAuthentication” -Value 1   

That should be it. Now, we can close the PowerShell remote connection. (Or just close the PowerShell window if you are lazy.)

  1. Exit-PSSession

I hope this helps. Its pretty straightforward… but, if you are unfamiliar with adding Trustedhosts to winrm… it might take you a while.