PowerShellで、モニターの電源を切る。入れる。
PowerShellがあれば、PowerShellスクリプトで、モニターの電源を切れます。
MonitorPowerOff.ps1
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$form=new-object System.Windows.Forms.Form
$message=[System.Windows.Forms.Message]::Create($form.Handle,274,61808,2)
$nativeWindow=new-object System.Windows.Forms.NativeWindow
$nativeWindow.DefWndProc([ref]$message)
MonitorPowerOn.ps1
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$form=new-object System.Windows.Forms.Form
$message=[System.Windows.Forms.Message]::Create($form.Handle,274,61808,-1)
$nativeWindow=new-object System.Windows.Forms.NativeWindow
$nativeWindow.DefWndProc([ref]$message)
« コマンドで、モニターの電源を切る。入れる。 | トップページ | VB.NETで、モニターの電源を切る。入れる。 »