Скрипт Powershell для включения монитора в определенное время.Протестировано с Windows 10
$Signature = @"
[DllImport("user32.dll")]
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll")]
public static extern void mouse_event(Int32 dwFlags, Int32 dx, Int32 dy, Int32 dwData, UIntPtr dwExtraInfo);
"@
Try {
$ShowWindowAsync = Add-Type -MemberDefinition $Signature -Name "Win32ShowWindowAsync" -Namespace Win32Functions -PassThru -ErrorAction Ignore }
Catch { }
$MONITOR_ON = -1;
$MONITOR_OFF = 2;
$MONITOR_STANBY = 1;
[datetime]$WakeUpTime = "02-26-2019 09:40:00 PM" # Set your Wakeup time MM/dd/yyyy hh:mm:ss"
[System.Int64]$MOUSEEVENTF_MOVE = 0x0001;
[System.IntPtr]$HWND_BROADCAST = New-Object System.IntPtr(0xffff)
[System.UInt32]$WM_SYSCOMMAND = 0x0112
[System.IntPtr]$SC_MONITORPOWER = New-Object System.IntPtr(0xF170)
$ShowWindowAsync::SendMessage($HWND_BROADCAST, $WM_SYSCOMMAND, $SC_MONITORPOWER, [System.IntPtr]$MONITOR_OFF);
$Wait = $true
While($Wait)
{
If((Get-Date) -ge $WakeUpTime)
{
$ShowWindowAsync::mouse_event($MOUSEEVENTF_MOVE, 0, 1, 0, [System.UIntPtr]::Zero);
$wait = $false
}
}