Share via

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

sherif.bedeir 0 Reputation points
2023-03-06T11:27:26.01+00:00

Hello,

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 for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Limitless Technology 45,226 Reputation points
    2023-03-07T15:36:20.8133333+00:00

    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–


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.