Hyper-V Enhanced Session Mode: Practical Drive and Device Redirection for VMs
Enhanced Session Mode lets you redirect local drives, clipboard, printers, and PnP devices into Hyper-V VMs over the VMBus—no network shares needed. Here's how to enable it, a worked example, and the trade-offs to watch.
17 Jul 2025, 00:49 UTC

The Problem: Moving Files and Devices Into a VM Without Network Shares
You spin up a Generation 2 Windows VM on Hyper-V, need to copy a 4 GB ISO from your laptop, and realize the only built-in path is a network share or a slow integration-services copy. Basic VMConnect gives you a console view but no clipboard, no local drives, no printer redirection. That friction adds up daily for developers and admins who treat VMs as disposable test environments.
Takeaway: Enhanced Session Mode (ESM) tunnels RDP through the VM bus so local drives, clipboard, printers, and Plug-and-Play devices appear inside the guest—no extra network config required. It works on Windows Server and Windows 10/11 Pro/Enterprise hosts, but it’s off by default and has a few gotchas.
How Enhanced Session Mode Differs from Basic VMConnect
Standard VMConnect uses the Hyper-V video and input remoting stack. You see the boot screen, BIOS, and early OS load, but resource redirection is limited to the vmconnect.exe clipboard integration (text only). ESM switches the session to an RDP connection over the VMBus once the guest RDP service is reachable. That RDP channel carries the full Remote Desktop device-redirection stack: drives, smart cards, audio, USB printers, and generic PnP devices.
PowerShell Direct is a separate path—it runs commands inside the VM via the VMBus without any network or RDP dependency. Use it for automation; use ESM for interactive work with local resources.
Enabling ESM on the Host and the VM
Host-level (run once per Hyper-V host)
# Run in an elevated PowerShell session on the Hyper-V host
Set-VMHost -EnableEnhancedSessionMode $true
Or via GUI: Hyper-V Manager → right-click host → Hyper-V Settings → Server → Enhanced Session Mode Policy → check Allow enhanced session mode.
VM-level (per Generation 2 VM)
# Replace 'MyVM' with the actual VM name
Set-VM -Name 'MyVM' -EnhancedSessionMode Enabled
GUI: VM Settings → Management → Enhanced Session Mode → select Enabled (or User forced to require it). The VM must be Generation 2 and running a Windows edition that includes the Hyper-V Guest Services component (Pro, Enterprise, Education, Server).
Worked Example: Redirecting a Local Drive and Clipboard
- Start the VM and wait for the OS to reach the logon screen.
- Open VMConnect (double-click the VM in Hyper-V Manager).
- Before clicking Connect, choose Show Options → Local Resources tab.
- Under Local devices and resources, click More… and check Drives (select C: or any local volume) and Clipboard.
- Click Connect. The session negotiates RDP over VMBus; you’ll see a brief “Configuring remote session” dialog.
- Inside the guest, open File Explorer. A new network location appears:
\tsclient\C(or the drive letter you selected). Copy the ISO directly from there—no SMB share, no copy-paste through the host clipboard.
Verification: from inside the guest, run net use and confirm \tsclient\C is listed. Try copying a 100 MB file; throughput typically matches the host’s storage speed because the VMBus bypasses the virtual NIC.
Linux Guests: Extra Steps Required
ESM can work with Ubuntu 22.04+, Fedora 36+, and other distros that ship xrdp and the Hyper-V Linux Integration Services (LIS). The host-side settings are identical, but the guest must:
- Install
xrdp(sudo apt install xrdpon Ubuntu). - Ensure the
hv_vmbus,hv_storvsc,hv_netvsc, andhv_utilskernel modules are loaded (standard on recent kernels). - Configure
/etc/xrdp/xrdp.inito listen on port 3389 and allow thevmconnectuser or your domain account.
After that, VMConnect’s Local Resources tab will show drives and clipboard for the Linux session. Expect occasional clipboard encoding issues with non-ASCII text; drive redirection is generally reliable.
Trade-offs and Limitations
- RDP dependency: If the guest RDP service stops, the firewall blocks TCP 3389, or Network Level Authentication (NLA) fails, ESM falls back to basic VMConnect with no redirection.
- Security surface: Redirected drives are exposed to the guest OS exactly like an inbound RDP connection. Apply the same account-lockout, credential-guard, and network-segmentation policies you would for remote desktop access.
- Client vs. Server defaults: Windows 10/11 Pro/Enterprise enable ESM by default on the host; Windows Server 2019/2022 require the explicit
Set-VMHoststep above. - No pre-boot access: ESM only activates after the guest RDP stack is up. For BIOS/UEFI changes or BitLocker PIN entry, you still need basic VMConnect.
Quick Verification Checklist
- Host:
Get-VMHost | Select-Object EnableEnhancedSessionModereturnsTrue. - VM:
Get-VM -Name 'MyVM' | Select-Object EnhancedSessionModeshowsEnabled. - Inside a connected session:
\tsclient\<drive>visible in File Explorer (Windows) or/mnt/tsclient(Linux). - Clipboard: copy text on host, paste in guest (and vice versa).
If any check fails, start with the guest firewall (Get-NetFirewallRule -DisplayGroup 'Remote Desktop') and the RDP service state (Get-Service TermService).
Next Steps
Enable ESM on your primary Hyper-V host today—it’s a one-line PowerShell command. Then pick a frequently used VM, turn on drive redirection, and measure how much faster you move artifacts compared to your current workflow. For Linux guests, schedule 15 minutes to install xrdp and test; the payoff is the same local-device convenience without maintaining SMB shares or USB passthrough rules.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.