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–