29

When using client Hyper-V in Windows 10, the first time you switch on Enhanced Session for VM it prompts you to select resolution, then remembers your selection and never prompts again it seems. Where does resolution setting get stored, or how can I force this screen resolution prompt again to change the selected resolution?

4 Answers 4

36

You can use cmd.exe and type:

VMConnect.exe <ServerName> <VMName> /edit

P.S.: You can also share local hard drive (Show Options ->tab Local Resources->Local devices and resources->More) as on normal windows remote desktop session :-)

You may need to have the VM started for this to work. You may need to run this from an admin prompt if on localhost.

11
  • 3
    Not sure why it has been downvoted, but I just tested and "VMConnect.exe <ServerName> <VMName> /edit" indeed does the trick - I have my screen resolution prompt :) Thanks for your response.
    – Mike
    Mar 3, 2017 at 6:59
  • I think this required 2012 or later? Doesn't seem to work on 2008R2.
    – Shiv
    Jun 4, 2018 at 21:38
  • 9
    Unfortunately, my proposed edit to the above was rejected by the community. However, this answer is incomplete and not useful without the additional information that using the /edit often will not work until the VM is already running. So, if you can't get the above to work, start the VM first in the Hyper-V Manager without connecting to it, then run the VMConnect.exe command line with the /edit option. Jul 31, 2018 at 16:14
  • It didn't work when I try to connect to Windows 7 Enterprise.
    – Dush
    Mar 4, 2019 at 23:38
  • If you are on Powershell and want to copy and paste the name of your vm you can use this command "Get-VM". This will print out every VM you have on your local machine.
    – Frank Fu
    Sep 15, 2020 at 18:23
40

There's a much easier way - after lots of research!

  • Close the VM client down

  • Change the Hyper-V Manager settings (right-hand window of the Hyper-V console) Hyper-V Manager Setting

  • Under Server -> Enhanced Session Mode Policy, simply:

    • Uncheck Allow Enhanced Session mode
    • Apply
    • Re-check Allow Enhanced Session Mode (this will reset).
    • Apply again

Enhance Session Mode

  • Now Start the VM in question but don't connect yet.

Start the VM

  • Wait for the VM to start then right-click the VM in the console
  • You should see "Edit Session Settings" option
  • Click this and the original dialogue will appear again.

Done.

7
  • 1
    This method also didn't show "Edit Session Settings" when connecting to Windows 7 Enterprise. But it worked for Windows 10
    – Dush
    Mar 4, 2019 at 23:40
  • 3
    "Edit session settings" option doesn't appear for me because vmconnect does not list the virtual machine(s). This is due to user permissions for localhost. I'm on a domain controlled PC.
    – Nobody
    Jul 26, 2019 at 12:17
  • 2
    Good job finding a deeply buried configuration for an otherwise simple setting.
    – InteXX
    Nov 29, 2019 at 10:08
  • It didn't work for me, an even better solution is to change resolution settings in guest OS, ie. right click desktop and display settings. and window will auto resize! Feb 13, 2020 at 19:58
  • 2
    Didn't work for me. Followed instructions up until the 'You should see "Edit Session Settings" option' step, at which point I did not see that option. Feb 3, 2023 at 14:35
2

Enhanced Session configuration/settings files:

  • The configuration files for each VM's enhanced session settings can be found in %APPDATA%\Microsoft\Windows\Hyper-V\Client\1.0
  • The file naming scheme is vmconnect.rdp.<VMGUID>.config
  • Each .config file contains 15 or 16 settings (15 for ver 8.0 and lower VMs, 16 for ver 8.1 VMs and higher). Two settings relating to the question are:
    • "SaveButtonChecked" which, if changed to False, will force the connection settings dialog to open the next time a connection is made to that VM
    • "DesktopSize" which stores the resolution
  • Deleting a VM's .config file in this directory will also force the connection settings dialog to open



Open the connection settings dialog using Hyper-V Manager:

  • When a VM is running and Enhanced RDP Sessions can be established, Edit Session Settings... will appear in the Action Pane (right-hand side)

    Edit Session Settings...

Open the connection settings dialog using vmconnect.exe

  • vmconnect.exe "VMServerName" "VMName" -G "VMGUID" -C 0 /edit
  • If there are multiple VMs that use the same VMName (e.g. 2x VMs named "Server1"):
    • vmconnect.exe "VMServerName" "Server1" /edit will always open the first instance of Server1 (and will never open the second instance) -- which is why using the the -G "VMGUID" argument (either by itself or together with "VMName") is beneficial.
    • If opening multiple vmconnect.exe instances, incrementing the -C argument by 1 each time it is run will stagger the window positions, making each vmconnect.exe window easier to see.

To Find out if a VM can establish an enhanced RDP session:

  • (Get-VMHost).EnableEnhancedSessionMode will tell you if Enhanced Session Mode is enabled on the VM server
  • On a VM Server, you can query the WMI namespace ROOT/virtualization/v2 and the Msvm_ComputerSystem class for a given VM
    • The EnhancedSessionModeState property returns a uint16 value:

      Value Description Meaning
      2 Allowed and avaliable Enhanced mode is allowed and available on the virtual machine
      3 Not allowed Enhanced mode is not allowed on the virtual machine
      6 Allowed but not available Enhanced mode is allowed and but not currently available on the virtual machine
      $VMId = 'fde3a5fa-2fbf-4010-8ea0-5d8fdd2c50ad'
      $CimParams = @{
          Namespace   = 'ROOT/virtualization/v2'
          ClassName   = 'Msvm_ComputerSystem'
          Filter      = "Name = '$VMId'"
          Property    = 'EnhancedSessionModeState'
      }
      (Get-CimInstance @CimParams).EnhancedSessionModeState
      
1

All I do is close the window and reconnect, and it prompts me for the Display configuration settings again (Windows 10 Hyper-V Manager)

1
  • 4
    The problem is if "save for future sessions" is checked it's impossible to get these options back via the GUI
    – kcdwayne
    Oct 3, 2021 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .