Wake monitors from power save via script.
I am trying to utilize a script to enable my monitors on a Windows 8.1 system after "Turn off the display" power saving and having no luck at all. The script is fired off by a motion sensor in the room, so that when a user's presence is detected it will automatically light up the display.  The only way I've found so far to wake the monitors is to move the mouse or press a key. 

I have the Windows power settings set to "Turn off the display" after 1 minute (for testing) and "Put the computer to sleep" set to "Never". When the system goes into powersave for the monitors, the monitors sleep and go dark. The control panel on the base on the monitors also go dark in response. When I issue most of the commands I've tried below, the control panel on the monitor lights up but the monitors themselves never turn back on. It's like the computer is exiting powersave but not waking up the screen until something physically moves.

Here is what I've tried:
  • nircmd monitor on (hangs)
  • nircmd monitor async_on (doesn't hang but doesn't turn the monitor on)
  • AutoIt script to move the mouse (move 100x by 100y)
  • Wake on LAN from remote system
Nothing seems to work outside of physically touching a button or moving a mouse. Has anyone gotten something like this to work?
January 23rd, 2015 6:03pm

Hi Allen,

Based on my research, It isn't sufficient to simulate a keystroke.

I can only find the powershell script which is used to wake laptop up from power-saver mode:

https://gallery.technet.microsoft.com/scriptcenter/Auto-Wake-Timer-2bf30aa3

If there is anything else regarding this issue, please feel free to post back.

Best Regards,

Anna Wang

Free Windows Admin Tool Kit Click here and download it now
January 26th, 2015 2:25pm

While I'm conversant in PoSh I'm not quite sure how the referenced script applies to my problem.  I can adjust power saving values with PoSh or just by using the powercfg application.  Neither option does anything to wake the system up in response to a script or other external activity.  Am I missing something here?
January 26th, 2015 11:58pm

Hi Allen,

I just tried to provide more relevant references which maybe helpful for you.

However, I found the scripts below to simulate user activity.

This script is used to send keyboard:

param($minutes = 60)

$myshell = New-Object -com "Wscript.Shell"

for ($i = 0; $i -lt $minutes; $i++) {
  Start-Sleep -Seconds 60
  $myshell.sendkeys(".")
}

And the script below can move mouse:

[system.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | out-null

$Pos = [System.Windows.Forms.Cursor]::Position
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point((($Pos.X) + 10) , $Pos.Y)

Refer to:

Prevent desktop lock or screensaver with PowerShell

If there is anything else regarding this issue, please feel free to post back.

Best Regards,

Anna Wang

Free Windows Admin Tool Kit Click here and download it now
January 27th, 2015 8:26am

Sorry for the delay here.  This solution didn't work.  The result is the same as other approaches I've tried to move the mouse or send a keystroke.  If say I had a document open and tell it to send a "X" character, the character will show up in the document but the monitors never wake.

edit: it looks like your solutions are wrapped around preventing the system from sleeping.  That part is easy, I just configure the system not to sleep.  I'm trying to wake up a sleeping system.

  • Edited by aderusha 17 hours 19 minutes ago
February 9th, 2015 1:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics