How to turn monitors on and off with a shortcut or hotkey in Windows
Melissa Compton Melissa Compton
5.49K subscribers
10,016 views
0

 Published On Jun 23, 2022

In this tutorial you will learn how to turn monitors on and off with a shortcut or hotkey in Windows. We will create a PowerShell script to put a shortcut on our desktop and create a hotkey for our keyboard. PowerShell scripts are automation tools and can be used in Windows 10 or Windows 11.

PowerShell Script: powershell (Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int h,int m,int w,int l);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)

Icon Path: ****DO NOT COPY AND PASTE THIS .DLL INTO FILE EXPLORER. ACCESS IT FROM THE CHANGE ICON OPTION IN THE PROPERTIES**** C:\Windows\System32\imageres.dll

Check out these programs I use for YouTube
Bluehost discount: https://melcompton.com/recommends/blu...
Canva Pro Trial: https://melcompton.com/recommends/can...
Adobe: https://melcompton.com/recommends/adobe/
Filmora: https://melcompton.com/recommends/won...

Follow me on social media:
Facebook:   / therealmelco.  .
Twitter: @melissaecompton
Instagram: @melissaacompton
LinkedIn:   / melissa-c.  .


This description contains affiliate links and I may be paid a small commission should you purchase using these links.

#melissacompton #powershell #windows11

show more

Share/Embed