Skip to main content

Adjust screen resolution on Windows executor

There are situations where you may want to increase (or decrease) the screen resolution within the Windows VM for testing purposes.

This can be done directly in the job with a run step, like the following:

    command: psexec64.exe -accepteula -nobanner -i 0 mstsc /v:localhost /w:1920 /h:1080
    background: true
    shell: powershell.exe

The above would set the resolution to 3840x2160 -- you can verify this is the case with the following run command:

- run:
    name: Get screen info
    command: |
      Add-Type -AssemblyName System.Windows.Forms
      [System.Windows.Forms.Screen]::AllScreens | fl *
Did this answer your question?