problem with 2 monitors and a TV connect to the same PC

sherif.bedeir 0 Reputation points


I have 2 monitors and a TV connected to the same PC

the 2 monitors are extended to each other. the TV is a duplicate for the second display.

I want (if possible) a Powershell or CMD script to do the next:

  • change the TV to duplicate the main screen without running any other interface (just script run and end without interaction of the user more than the double click ).
  • another script to get back the TV duplicating the second display

I wash someone help me, please.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,602 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,931 Reputation points

    Hello there,

    This sort of operation is not directly accessible from PowerShell in the sense that there is no .NET interface to these settings. A lot of core OS stuff is unmanaged code that can only be manipulated via win32 API calls.

    Windows 7, 8 and 10 are supposed to come with a small program that does exactly this: displayswitch.exe

    displayswitch.exe /internal Disconnect projector (same as "Show only on 1" from the Display Properties dialog)

    displayswitch.exe /clone Duplicate screen

    displayswitch.exe /extend Extend screen

    displayswitch.exe /external Projector only (disconnect local) (same as "Show only on 2" from the Display Properties dialog)

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–