rdcman hyperv

Accessing Hyper-V Virtual Machine Console Using RDCMan

Remote Desktop Connection Manager (RDCMan) is an official utility from Microsoft to connect to servers via RDP (which replaced the Remote Desktops snap-in) and efficiently handle the daily management tasks by System Administrator. The version of RDCMan 2.7 has interesting feature it can be used to connect directly to the Hyper-V virtual machine console using VMConnect. The connection is made through Enhanced Session Mode, which uses the VMBus (a logical inter-partition communication channel between the Hyper-V host and the virtual machines).

To connect to a virtual machine, the first thing to do is to get its VM ID. You can get it using PowerShell, for example:

Get-VM -Name lon-dc01 | select ID

get vm rdcman

After you’ve got the virtual machine ID, open RDCMan and add a new server. Check item VM console connect. Then specify the name of the Hyper-V server on which the VM resides in the Server name field. In the id field specify its identifier obtained in the previous step and save the settings.

add server hyper v

To connect to the VM, you need to specify a user account with Hyper-V Administrator privileges.

Note. Even if your account is included in the local group Administrators, add it also to the Hyper-V Administrators group.

rdcman hyper v

Now you can connect to the virtual machine console on the hypervisor Hyper-V as to normal server. The advantage of connecting to the console is that the VM can be in the internal isolated private network, the access via RDP may be disabled, it may does not have a network adapter at all you are still able to connect to it.

Tip. On Hyper-V server TCP port 2179 must be opened.

boot vm rdcman

If you want to provide the ability to connect to a particular VM’s console to a regular user (not an Administrator), you must grant the appropriate permissions.

Grant-VMConnectAccess -ComputerName hv-srv-01 -VMName lon-srv-01 -UserName contoso\jpatrick

In case you are facing with “Unknown disconnection reason 3848” error when connecting, you need to configure a number of registry settings. The problem is that the CredSSS (Credential Security Service Provider) policy on Hyper-V host doesn’t allow to authenticate remote users by default.

rdcman hyper v disconnect

Start the PowerShell console with administrative privileges and run the following commands:

New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowDefaultCredentialsDomain -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentialsDomain -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowDefaultCredentials -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsDomain -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentials -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsWhenNTLMOnly -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsWhenNTLMOnlyDomain -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentials -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentialsWhenNTLMOnly -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force

Now try to connect again. It should work!

So, using RDCMan you can remotely connect to any virtual machine console running on the Hyper-V host, regardless of the guest OS (whether it’s Window, Linux, MacOs, or anything else).

You may also like:

Add Calendar Permissions in Office 365 via PowerSh... This is a tutorial on how to add calendar permissions in Office 365 for your users via PowerShell. You can add the permissions on a specific user’s ma...
Deploy LGPO with MDT 2013 Local Group Policy (LGPO) of computer is configured through gpedit.msc snap-in, which does not provide the possibility to export/import settings. That...
How to Migrate User Profiles with User State Migra... One of the most popular tools to migrate user profiles from one Windows computer to another is the set of CLI utilities – User State Migration Tool (U...
How to Get List of Installed Programs in Windows 1... In this simple guide, we will show you two different ways of how to get a list of installed programs in Windows 10, 8 or Windows 7 using built-in comm...
Using PsExec to Run Commands Remotely The PsExec is an easy Windows utility to replace the telnet tool. It allows you to run programs and processes on remote systems, using all the feature...

Add Your Comment