{"slug": "powershell-script-to-control-monitor-power-state-place-all-displays-into-standby", "title": "PowerShell script to control monitor power state: place all displays into standby with -TurnOff or wake them with -TurnOn.", "summary": "This article describes a PowerShell script called Screen Controller that uses Windows messaging to place all connected displays into standby mode with the `-TurnOff` parameter or wake them with the `-TurnOn` parameter. Unlike tools that fully power off monitors via hardware settings, this script runs entirely in PowerShell without external dependencies and requires a logged-in user session. It is designed for automation through Task Scheduler or Group Policy, such as turning monitors off at 6 PM and waking them at 6 AM.", "body_md": "Screen Controller (PowerShell) A simple PowerShell script to reliably control monitor/display state. This uses the same method as when a computer display times out through normal power settings. Unlike tools like ControlMyMonitor that change monitor hardware settings and actually power off the monitor, this script uses Windows messaging to place displays into standby (not a full power-off) and runs entirely in PowerShell with no external dependencies. You can wake the screens manually by moving the mouse or pressing a key and allowing a few seconds for them to resume, or wake them remotely through the script. Use -TurnOff to put displays into standby, or -TurnOn to wake them. Usage # Turn monitors off .\\ScreenController.ps1 -TurnOff # Wake monitors .\\ScreenController.ps1 -TurnOn Or if calling from cmd: # Turn monitors off powershell.exe -ExecutionPolicy Bypass -File .\\ScreenController.ps1 -TurnOff # Wake monitors powershell.exe -ExecutionPolicy Bypass -File .\\ScreenController.ps1 -TurnOn How it Works TurnOff: Uses Windows messaging to place all connected monitors into standby (not just a black screensaver). TurnOn: Uses Windows messaging to bring the displays back on. A simulated key press has been added for compatibility with systems where the ON command alone may not reliably wake the monitors. Common Use Case Set up with Task Scheduler or Group Policy Preferences to automatically: Turn monitors off at 6 PM Wake monitors at 6 AM Requirements Windows 10/11 PowerShell 5.1 or later Must run in the context of a logged-in user (interactive session), not as SYSTEM", "url": "https://wpnews.pro/news/powershell-script-to-control-monitor-power-state-place-all-displays-into-standby", "canonical_source": "https://gist.github.com/asheroto/48337e8451f5a5a01ba2c270426a5350", "published_at": "2025-08-19 16:38:29+00:00", "updated_at": "2026-05-22 13:47:48.942585+00:00", "lang": "en", "topics": ["developer-tools", "enterprise-software"], "entities": ["PowerShell", "Windows", "Task Scheduler", "Group Policy"], "alternates": {"html": "https://wpnews.pro/news/powershell-script-to-control-monitor-power-state-place-all-displays-into-standby", "markdown": "https://wpnews.pro/news/powershell-script-to-control-monitor-power-state-place-all-displays-into-standby.md", "text": "https://wpnews.pro/news/powershell-script-to-control-monitor-power-state-place-all-displays-into-standby.txt", "jsonld": "https://wpnews.pro/news/powershell-script-to-control-monitor-power-state-place-all-displays-into-standby.jsonld"}}