Powershell - Changing the screen resolution on a Windows server

To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!

Hello,

It is possible to change the screen resolution easily in Powershell on Windows servers (with or without GUI).

This can be interesting on a core Windows server.

# Import the servercore module.
Import-Module -name servercore
# Note: the servercore module is natively available on a Windows server.
# Display the current screen resolution
Get-DisplayResolution
# Change screen resolution on Windows server
Set-DisplayResolution -Width 1280 -Height 1024 -Force
# -force suppresses the confirmation request
# Note: The cmdlet runs setres.exe -W 1280 -H 1024 -F in the background.

I tried copying setres.exe and the servercore module to a Windows 10 but with no conclusive results.

For a Windows client you can try following this article :
hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell

Related links