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:
- run: name: Restart local mstsccommand: psexec64.exe -accepteula -nobanner -i 0 mstsc /v:localhost /w:1920 /h:1080 background: true
shell: powershell.exe
- run: name: Naive impl to wait until the screen stretches command: Start-Sleep 5
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 *
Comments
Article is closed for comments.