Virtual machines have opened doors for many possibilities. It introduced tasks, such as running multiple operating systems, software testing, server consolidation, and more, that you can now carry out without affecting your main computer system. This innovation provides a flexible and isolated environment for various computing needs. To further harness the power of virtualization, Microsoft developed Hyper-V, an advanced platform that leverages the capabilities of virtual machines within the Windows environment.
To improve user experience when interacting with virtual machines, using the Hyper-V Enhanced Session Mode on Windows 10 is a practical choice. This mode can improve many operations, such as redirecting local devices and resources, streamlining file sharing, and improving display and input experience. In this blog, we will dive deeper into the essence of Enhanced Session Mode and, most importantly, how to enable and disable this feature.
What is Hyper-V?
Before we get into the Enhanced Session Mode, let us give you an overview of the technology it caters to the Hyper-V. Hyper-V is a virtualization technology developed by Microsoft that enables IT administrators to create and manage virtual machines (VMs) from one physical computer.
This virtualization platform allows users to run multiple computer systems with the same hardware, which is ideal for specific tasks. These tasks include running a computer system isolated from your main operating system, building a testing environment, resource management, and many more.
Optimize, automate, and streamline your Hyper-V management with NinjaOne to maximize productivity.
Learn more about NinjaOne Hyper-V management
What is Enhanced Session Mode?
To expand Hyper-V’s functionalities, users can leverage Enhanced Session Mode. This feature improves the interaction between a host machine and its virtual machines by enhancing the performance and capabilities of remote connections to the VMs.
Key features and benefits of Enhanced Session Mode
- Local device and resource redirection. Enhanced session mode allows virtual machines to access devices such as printers, USB drives, audio devices, and the clipboard directly from the host system.
- Improved display options. The Hyper-V mode also enables support for display improvements such as dynamic resolution resizing, multi-monitor setups, and adjustable VM window sizes.
- Seamless file sharing. Enabling the Enhanced Session Mode feature allows for optimized file-sharing capabilities, such as direct copying and pasting of files or text between the host and the virtual machine without needing network shares.
- Enhanced input integration. If enabled, the Hyper-V feature can also promote smooth interaction with input devices, offering a native experience in the VM.
- Secure connections. Enhanced session mode incorporates robust security measures, including secure communication channels, to protect data and resources during interactions between the host and virtual machines.
How to enable and disable Enhanced Session Mode?
Toggling the option to enable and disable Enhanced Session Mode is pretty straightforward if you follow the instructions. But before anything else, you should ensure that your system meets the initial requirements.
Prerequisites
- Ensure Hyper-V is enabled on Windows 10
Without Hyper-V installed and running, the Enhanced Session Mode option will not be available. So, you must first confirm that Hyper-V is installed and active on your Windows 10 system. - Verify compatibility with guest operating systems
Enhanced Session Mode has specific requirements for guest operating systems. You need to verify if the guest operating system is supported to run the Hyper-V feature. Most modern versions of Windows (such as Windows 10, Windows 11, and Windows Server editions) support these services out of the box. Additionally, Enhanced Session Mode is not supported for generation 1 virtual machines (except those running Windows 10 Pro, Education, or Enterprise) or for virtual machines running non-Windows operating systems. - Check administrator privileges
Lastly, you need to make sure that you have administrator privileges on the host machine. Hyper-V configurations under Enhanced Session Mode can only be performed if you have administrator access. Without sufficient permissions, you won’t be able to access or modify the settings needed to use Enhanced Session Mode.
How to enable Enhanced Session Mode?
Hyper-V hosts running on Windows 10 or Windows 8.1 would have the Enhanced Session Mode on by default. For Windows versions such as Windows Server 2016 or Windows Server 2012 R2, you need to manually turn the Enhanced Session Mode on. Enhanced session mode can be turned on using Hyper-V Manager or PowerShell. Here’s how:
A. Using Hyper-V Manager
1. Open Hyper-V Manager:
- Press Windows + X and select Hyper-V Manager, or search for Hyper-V Manager in the Start menu.
2. Enable Enhanced Session Mode on the Hyper-V Host:
- In Hyper-V Manager, click on the Hyper-V Host name in the left pane.
- In the right pane, under Actions, click Hyper-V Settings.
- In the Hyper-V Settings window, under Server, select Enhanced Session Mode Policy.
- In the right pane, select Allow Enhanced Session Mode. This enables the feature for all virtual machines on the host.
- Click OK to save the changes.
3. Enable Enhanced Session Mode on the Virtual Machine:
- In Hyper-V Manager, right-click the virtual machine (VM) for which you want to enable Enhanced Session Mode.
- Select Settings from the context menu.
- In the Settings window, under Management, click Integration Services.
- Ensure the Enhanced Session Mode checkbox is selected. If it’s not, check it.
- Click OK to apply the changes.
4. Start and connect to the Virtual Machine using Enhanced Session Mode:
- In Hyper-V Manager, right-click the VM and select Start to power on the virtual machine.
- Once the VM is powered on, right-click the VM and select Connect.
- A connection window will appear. If Enhanced Session Mode is available, you’ll see an option to Connect with enhanced session.
- Click OK to initiate the session with Enhanced Session Mode enabled.
B. Using PowerShell
1. Open an elevated PowerShell (Administrator):
- Press Windows + X and select Windows PowerShell (Admin), or search for PowerShell in the Start menu, right-click it, and choose Run as Administrator.
2. Enable Enhanced Session Mode on the Hyper-V Host:
- Run the command Set-VMHost -EnhancedSessionMode $true to enable Enhanced Session Mode on the Hyper-V host.
3. Verify Enhanced Session Mode is Enabled:
- Run the command Get-VMHost | Select-Object -Property EnhancedSessionMode to check if Enhanced Session Mode is on. This should return a True value if Enhanced Session Mode is enabled.
4. Enable Enhanced Session Mode on a Specific Virtual Machine (Optional):
- You also have the option to enable Enhanced Session Mode for individual virtual machines. Run the command Set-VM -Name “VMName” -EnhancedSessionMode $true and replace the “VMName” with the name of the VM you want to configure.
- To verify if Enhanced Session Mode is enabled for a specific VM, run the command Get-VM -Name “VMName” | Select-Object -Property Name, EnhancedSessionMode and replace the “VMName” with the name of the VM you want to check. The EnhancedSessionMode property should return a True value if it is enabled.
How to disable Enhanced Session Mode?
There are some instances Enhanced Session Mode need to be disabled:
- Troubleshooting connection issues. Disabling Enhanced Session Mode may help rule out causes of connectivity issues, such as potential conflicts or incompatibilities of specific virtual machines with the Hyper-V feature.
- Compatibility problems. Resolving compatibility issues between Enhanced Session Mode and guest virtual machines running on older or less common OS may require turning off the feature.
- Security audits or investigations. In certain security audits or investigations, it might be required to disable Enhanced Session Mode to ensure a more isolated and controlled environment for the virtual machines.
- Performance issues. In rare cases, Enhanced Session Mode might introduce minor performance degradation for certain workloads.
Similar to enabling the feature, turning off Enhanced Session Mode can be done through Hyper-V Manager or PowerShell. Here’s how:
A. Using Hyper-V Manager
1. Open Hyper-V Manager:
- Press Windows + X and select Hyper-V Manager, or search for Hyper-V Manager in the Start menu and open it.
2. Disable Enhanced Session Mode on the Hyper-V Host:
- In Hyper-V Manager, click on the Hyper-V Host name in the left pane.
- In the right pane, under Actions, click Hyper-V Settings.
- In the Hyper-V Settings window:
- Under Server, select Enhanced Session Mode Policy.
- In the right pane, uncheck Allow Enhanced Session Mode to disable the feature for all virtual machines on the host.
- Click OK to save the changes.
3. Disable Enhanced Session Mode on a Virtual Machine (Optional):
- In Hyper-V Manager, right-click the virtual machine (VM) you want to configure.
- Select Settings from the context menu.
- In the Settings window:
- Under Management, click Integration Services.
- Uncheck the Enhanced Session Mode checkbox if it is selected.
- Click OK to apply the changes.
B. Using PowerShell
1. Open an elevated PowerShell (Administrator):
- Press Windows + X and select Windows PowerShell (Admin), or search for PowerShell in the Start menu, right-click it, and choose Run as Administrator.
2. Disable Enhanced Session Mode on the Hyper-V Host:
- Run the command Set-VMHost -EnhancedSessionMode $false to disable Enhanced Session Mode on the Hyper-V host.
3. Verify Enhanced Session Mode is Disabled
- Run the command Get-VMHost | Select-Object -Property EnhancedSessionMode to check if Enhanced Session Mode is off. This should return a False value if Enhanced Session Mode is disabled.
4. Disable Enhanced Session Mode on a Specific Virtual Machine (Optional)
- You also have the option to disable Enhanced Session Mode for individual virtual machines. Run the command Set-VM -Name “VMName” -EnhancedSessionMode $false and replace the “VMName” with the name of the VM you want to configure.
- To verify if Enhanced Session Mode is disabled for a specific VM, run the command Get-VM -Name “VMName” | Select-Object -Property Name, EnhancedSessionMode and replace the “VMName” with the name of the VM you want to check. The EnhancedSessionMode property should return a False value if it is disabled.
Real-life applications of Enhanced Session Mode
To better picture the importance of enabling Enhanced Session Mode for Hyper-V, here are some examples of the feature’s real-life use cases.
1. Dynamic display configuration for multitasking
There are instances when users would want to be able to adjust the window to one-half of their monitor while keeping other tools visible on the other half, introducing seamless multitasking capabilities. Enabling Enhanced Session Mode can dynamically resize the VM window to fit a user’s workspace, maximizing productivity.
2. Audio redirection for multimedia or conferencing in VMs
Some VM users want to access client-specific environments for video conferencing or multimedia presentations. Enabling Enhanced Session Mode can redirect audio to ensure that sounds coming from the VM can be heard through the host’s speakers or headphones.
3. USB device redirection for specialized hardware
A VM user may need to connect to a specialized portable tool that is a USB-connected device. Turning on Hyper-V’s Enhanced Session Mode allows the VM user to access and use that USB device directly within the virtual machine. This eliminates the need for complex network setups or additional drivers on the host machine.
4. Printer redirection for document processing in VMs
A graphic designer working within a virtual machine requires access to physical printers for high-quality mockups. Enhanced Session Mode’s printer redirection feature seamlessly connects the designer’s host printers to the virtual machine environment, eliminating the need to transfer files between the VM and the host.
5. Full clipboard support for productivity in cross-platform work
A software developer is debugging code across Linux-based VMs and a Windows host system. With Enhanced Session Mode’s full clipboard support, they can copy a block of code or error logs from the VM and paste it directly into a Windows IDE or email client.
Common issues with Enhanced Session Mode and how to resolve them
While the feature has greatly improved Hyper-V utilization, problems with using Enhanced Session Mode are still inevitable. Here are some common issues with the Hyper-V feature and how to resolve them.
1. Enhanced Session Mode Unavailability
Sometimes, users stumble upon an issue where the option to enable Enhanced Session Mode isn’t available or visible in the connection window. Here are some possible causes and their resolutions:
- Hyper-V host is not properly configured. Ensure that Enhanced Session Mode is enabled on the Hyper-V host. Go to Hyper-V Settings > Enhanced Session Mode Policy and check if the option is enabled.
- Guest OS is not supported. You must first confirm whether your guest VMs are running on operating systems supported by Enhanced Session Mode. The Hyper-V feature typically supports Windows-based VMs with updated Integration Services.
- Integration Services may be missing or outdated. Install or update Integration Services within the guest OS to enable Enhanced Session Mode features.
2. Clipboard sharing is not working
There may be instances when users cannot copy and paste between the host and VM. Here’s a possible cause and resolution:
- Integration features are disabled. Ensure that Enhanced Session Mode is enabled in the VM’s settings. Right-click the VM in Hyper-V Manager > Settings > Integration Services, and verify that Clipboard Sharing is checked.
3. Drive redirection sharing is not functioning
Issues where drives on the host are not accessible within the VM, may arise on some occasions. Here’s a possible cause and resolution:
- Integration features are disabled. Ensure that Enhanced Session Mode is enabled in the VM’s settings. Right-click the VM in Hyper-V Manager > Settings > Integration Services, and verify that Drive Redirection is checked.
4. USB device redirection fails to work
Others may also encounter problems with USB devices not connecting to the virtual machine even if Enhanced Session Mode is enabled. Here are some possible causes and their resolutions:
- USB device is not supported. Note that not all USB devices are supported in Enhanced Session Mode. Check first if your USB device is compatible with the Hyper-V environment and Enhanced Session Mode.
- Uninstalled drivers. Verify that the VM has the needed drivers installed for the USB device. Update the guest operating system accordingly if necessary.
- Connection type isn’t compatible. Remember that some USB devices might require specific connection types (e.g., USB 2.0, USB 3.0) and may not function correctly if the host machine, the virtual machine, or the Enhanced Session Mode implementation do not support the connection type. Check first if the connection type of your USB device is supported.
Hyper-V Enhanced Session Mode FAQs
1. Can Enhanced Session Mode be used with Linux VMs?
Linux does not natively support the full set of Enhanced Session Mode features since the Hyper-V feature was developed primarily for Windows-based virtual machines and requires support for Integration Services. However, Linux VMs can use some features of Enhanced Session Mode, such as basic display output and mouse integration through the Hyper-V Linux Integration Services.
Additionally, Linux’s compatibility with Enhanced Session Mode depends on whether the necessary drivers or modules are included in the Linux kernel or need to be manually installed.
2. What happens if Enhanced Session Mode is turned off?
Turning off Enhanced Session Mode will also disable the features VMs leverage it for, such as dynamic resizing, clipboard sharing, USB or printer redirection, and more. This reverts the VM connection to basic mode.
3. Is Enhanced Session Mode secure?
Generally speaking, Enhanced Session Mode is secure as long as it’s used properly. This is because the data transferred between the host and VM occurs within the Hyper-V infrastructure, which operates locally.
However, there are some instances where the session’s security will depend on how VMs are managed and configured. Operations like guest VM hardening and unmanaged resource redirection restrictions can sometimes make the session vulnerable to security risks.
Enhanced Session Mode best practices
Depending on your user role, there are best practices and recommendations for efficiently using the Enhanced Session Mode.
For System administrators
- Enable Enhanced Session Mode selectively. Limit the feature’s activation to select hosts and VMs where it is required.
- Limit resource redirection. Enabling the feature only on necessary USB devices, printers, and drives reduces the attack surface.
- Secure RDP traffic. Enhance Remote Desktop Protocol (RDP) security by implementing firewalls, restricting access to authorized IP addresses, and enabling Network Level Authentication (NLA).
- Harden guest virtual machines. Protect your guest VMs with security tools and update their OS regularly.
- Implement RBAC. Enforce control on access to Enhanced Session Mode by leveraging Role-Based Access Control (RBAC).
- Monitor and audit enhanced session mode usage. Always review Enhanced Session Mode activities and investigate unusual usage.
- Test configurations in a non-production environment. Validate configurations before deploying enhanced session mode in live environments.
For regular users
- Use resource redirection responsibly. Avoid unnecessary redirections and limit them to devices that need the feature.
- Follow security policies. Always comply with your organization’s policies regarding file transfers, clipboard usage, and other redirections.
- Report issues promptly. Alert system administrators of any security concerns related to Enhanced Session Mode usage.
For IT teams or support staff
- Educate users. Provide Enhanced Session Mode training to designated users to promote efficient and proper use.
- Backup critical virtual machines. Administer regular backups for easy recovery in case of misconfigurations or security incidents.
- Test compatibility with applications. Verify that the features provided by enhanced session mode do not conflict with specific applications or workflows.
Managing enhanced session mode in Hyper-V
Enhanced Session Mode can significantly promote upgraded user experience within the Hyper-V environment. This mode has vital features such as device redirection, display options, and file sharing that can expand VM functionalities. But depending on the purpose, it’s still better to consider when to enable or disable Enhanced Session Mode. Following best practices can also ensure proper use of the feature to maximize its full potential and maintain a secure virtualized infrastructure.