DEV Community

Diego Carrasco Gubernatis
Diego Carrasco Gubernatis

Posted on • Originally published at diegocarrasco.com on

How to change the Screen Resolution of a Guest-OS (Ubuntu) in Hyper-V with PowerShell on Windows 11

TL;DR

To change the screen resolution of a VM in Hyper-V, use PowerShell. The command requires the VM name and the desired resolution.

Context

Unlike in VirtualBox, in Hyper-V I could not find a GUI option to change the screen resolution directly. Instead, I had to use PowerShell to adjust the display settings of your virtual machine.

Steps

  1. Identify the VM Name

Find the name of your VM in Hyper-V Manager. (Search for Hyper-V Manager in the start menu to access it)

Hyper-V Manager VM Name

  1. Open PowerShell

Open a PowerShell terminal on your host machine.

  1. Execute the Command

Use the following PowerShell command, replacing "Ubuntu 22.04 LTS2" with your VM's name and adjusting the resolution as needed:

Set-VMVideo -VMName "Ubuntu 22.04 LTS2" -HorizontalResolution 1920 -VerticalResolution 1080 -ResolutionType Single

Enter fullscreen mode Exit fullscreen mode
  • HorizontalResolution : The width of the screen in pixels (e.g., 1920).
  • VerticalResolution : The height of the screen in pixels (e.g., 1080).
  • ResolutionType : Set to Single for a single monitor setup.

References

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more