The Computer Oracle

How to do a Powershell (or other) script to change screen resolution?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island Looping

--

Chapters
00:00 How To Do A Powershell (Or Other) Script To Change Screen Resolution?
00:15 Accepted Answer Score 3
00:36 Answer 2 Score 2
01:04 Answer 3 Score 0
01:20 Answer 4 Score 2
01:52 Thank you

--

Full question
https://superuser.com/questions/29450/ho...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#resolution #powershell

#avk47



ACCEPTED ANSWER

Score 3


There isn't a native powershell way to set the resolution. You could write in-line C# code in a powershell script to do it. Otherwise you would need to find a third party commandline application that does it and just call that from your script.




ANSWER 2

Score 2


As EBGreen has said, Powershell cannot do it in its vanilla state. However being a .NET-based shell, you could either use .NET within a powershell script, use a traditional CLI application or write a Cmdlet to do it.

These links may help you out if you decide to explore those paths further:




ANSWER 3

Score 2


See the freeware QRes :

Description: Command line utility to change screen resolution, color depth and refresh rate...

For the case of multiple monitors, you can see Display Changer (free for personal and educational use):

Display Changer changes the display resolution, runs a program, then restores the original settings. It can also change the resolution permanently and rearrange the monitors in a multiple-monitor setup. This is useful for games and home theater computers.




ANSWER 4

Score 0


You can't do this using a native Windows command, but you can use an application invoked from the command line like http://www.pcdownloadworld.com/prgdb/reschange.htm .

I've used it before - it is a little cumbersome but does what it says on the tin.