I'm trying to figure out how to completely disconnect individual internal and external displays on my setup using PowerShell or CMD. I don't want to just make them blank; they need to actually lose power. Here's my setup:
1. 1 internal laptop display
2. 1 external display connected via HDMI
3. 3 additional external displays using USB 3.0 (I think they're via display port using Asus EZLink).
What I need is a script or batch file that does the following:
1. Save the current configuration of all displays, including their locations and orientations.
2. Disconnect the internal display and all but one of the external displays.
3. A second script to restore the saved configuration.
Currently, I use system settings to disable displays and "Displayswitch.exe /extend" in CMD to bring back most displays, but I often have to manually adjust settings for the last one. I've tried various commands, but they often lead me to third-party software, which I want to avoid. I'm using Windows 11 Home (Version 10.0.26100 Build 26100). Thank you!
3 Answers
I get that you want to avoid third-party software, but honestly, for tasks like this, sometimes it makes things a lot easier. What about using a bat file that runs multiple commands to manage your displays? You could create a quick script that reorders your displays and saves settings without full disconnection. The basic `DisplaySwitch.exe` and some PowerShell cmdlets might still help you achieve better results than you’re having right now. Just a thought!
You might be in a bit of a bind since Windows doesn't allow for easy management of individual display states without third-party tools. However, have you tried exploring the Windows Management Instrumentation (WMI) options? You can use WMI calls in PowerShell to manipulate display settings, although this might be advanced. Look into the `Get-WmiObject` cmdlet to control the displays directly, which could let you achieve the disconnect you need. Keep in mind, it's not straightforward and may require some tweaking.
It seems your requirements are pretty strict! If you are truly looking to avoid third-party tools, then I suggest you keep hunting through PowerShell documentation. There are some archived scripts and community solutions that might help you out with saving configurations, just ensure they don’t rely on external applications. Always back up your work to avoid crashes.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures