Notes by KargWare
Software | Web | QA-CI-CD | Apps | Hardware
Impressum Datenschutz
Tags Categories Dates
 Seitenende 

Archive of Notes by KargWare

2020-12-11
Turn off your monitors with powershell
2020-12-11 Nicolas Karg
SOFTWARE
powershellenergy savingoperation system

Running the ps1 command will turn off your monitors or screens. ```powershell 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 powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int PostM…

 Seitenanfang 

Kargware

  • RSS-Feed
  • GitHub
  • GitLab
  • Twitter
  • Instagram
  • Stackoverflow
  • Nuget

Website

  • Impressum
  • Datenschutz
  • Info

Services

  • Wordpress Blog
  • Jekyll Notes
  • NextCloud
  • OwnCloud
  • Matomo
  • YOURLS