It might come in handy at some point to control the multiple display setup via command line or perhaps integrate this function to some scripts (fully automated Kiosk machine deployments for example).
The Windows executable that can be used for this is stored in %SystemRoot%\System32 folder and is called “displayswitch.exe“¨.
You can run it without any switches, though this brings up the standard Windows GUI from the picture above.
For silent use, it has these switches available:
/internal Switch to use the primary display only.
/clone The primary display will be mirrored on a second screen.
/extend Expand the Desktop to a secondary display.
/external Switch to the external display only (second screen).
Example use in command line:
c:\windows\sysnative\displayswitch.exe /clone
And that’s it – all connected displays are now being cloned.