0

I need to be able to turn off my screen instantly manually.

I tried powercfg /change monitor-timeout-ac 0, but looks like setting the value to 0 turns it to never. Values like 0.1 also change it to never.

Is there any way I can set this value to 0 minutes, or is there another command that i can use to turn off my screen manually?

-1

From this TechNet scripting page:

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)
| improve this answer | |
1

(Running this has the side effect of also locking the workstation in Windows 10. You will need to know the password in order to log back in)

Running in 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)

Would be the correct answer in order to turn off the display. Yes, it also turns off the display on a laptop using Powershell (and some .NET C# code)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.