Changing monitor direction via CLI

Hi all,

I need the following:

On some Windows machines there are two monitors, one is in landscape mode and one in portrait mode (turned 90°)

How can I set via CLI the direction and also the resolution?

Under Linux this would be simple and trivial solveable with xandr.

Is there an alternative for Windows (with a free license, as no additional license costs can be charged)

Thanks a lot in advance.

3 Comments   [ + ] Show comments
  • this link mentions 3 free ones that can change the res.
    http://superuser.com/questions/89302/any-way-of-changing-windows-7-screen-resolution-via-command-line - SMal.tmcc 7 years ago
  • A power shell script may be the way to go

    https://www.google.com/#q=changing+monitor+settings+powershell+windows+7 - SMal.tmcc 7 years ago
  • I've never tried it and don't have the hardware to duplicate it at the moment, but couldn't you just change the registry keys for resolution/orientation? http://superuser.com/questions/106749/what-registry-key-or-windows-file-determines-where-monitors-are-placed-in-a-mult - jknox 7 years ago

Answers (1)

Posted by: EVEEN 7 years ago
Green Belt

 There isn't much out there as managing how the monitor is placed is rarely a central management concern.

You can make your own small progran in .NET for example that leverages the Win32 ChangeDisplaySettings method to control orientation. (and resolution if needed as well.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ