Turn off your monitors with powershell
Running the ps1 command will turn off your monitors or screens.
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
Running the ps1 command (SendMessage
is replaced with PostMessage
) will turn off your monitors amd close the terminal.
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
You can copy the powershell code also in a batch-file, like SwitchMonitorsOff.bat
, for easy re-use.
Quellen
Weitere BeitrÀge innerhalb der Kategorie
Weitere BeitrÀge