1

I have been trying multiple apps, but I do not know how to adjust Windows' screen brightness automatically. Is there a way this can be done through Task Scheduler?

To give a specific scenario, I'd like Task Scheduler to set the screen's brightness to its lowest setting daily at 10:00 PM and turn to 80% brightness when I turn on my computer. Is this possible?

The Editor
  • 77
  • 7
  • Windows supports night light to turn the blue content down according to a schedule. I use f.lux which has more features. I find that reducing the blue light is enough, I don't have to dim the screens. – Rohit Gupta Jan 12 '23 at 20:41
  • @RohitGupta I also use a night light feature, but I'd also like an automatic way to adjust the screen's brightness. And thanks to DrMoishe Pippik, I do now! – The Editor Jan 12 '23 at 21:21

1 Answers1

1

You can use PowerShell directly, or in a .bat file, as below,

powershell (Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(1,10)

Replace 10 with 80 for 80% brightness, or a smaller integer to make it dimmer yet.

Now just add Scheduled Tasks calling the respective scripts at logon and at the specific time for dimming.

Good idea: That should serve as an effective reminder to shut down the PC and go to bed, but allow you to restart at usable brightness, if needed.

DrMoishe Pippik
  • 25,661
  • 4
  • 36
  • 54
  • IT WORKED! I've been looking so long for a simple solution. Thanks to you, I was able to set it up in a few minutes. Now the screen's brightness can change on its own, and I don't even have to download a special app. Thank you! – The Editor Jan 12 '23 at 21:19
  • Actually, there's a problem now. When I start up my computer, the brightness doesn't always work. It didn't work today, for example. When I go to Task Scheduler, the task did trigger, apparently, but the "Last Run Result" says, "The operator or administrator has refused the request." Any thoughts as to why? (It works fine if I manually run the task, but that defeats the purpose, of course.) – The Editor Jan 19 '23 at 14:56
  • Have you tried creating as Administrator or SYSTEM, rather than as user? See https://superuser.com/questions/347751/how-can-i-run-a-scheduled-task-as-system, for example. – DrMoishe Pippik Jan 19 '23 at 17:04
  • That might have been the problem. I just changed the tasks for SYSTEM rather than user. I'll find out if it worked in the morning. Thanks! – The Editor Jan 21 '23 at 03:27
  • Unfortunately, the screen still did not work. I just checked Task Scheduler, and the app did try running today, but it said, as before, "The operator or administrator has refused the request." Interestingly, if I manually run the task, it works. However, having to manually run the task defeats the purpose, of course, so what other action might solve the problem? – The Editor Jan 21 '23 at 14:36
  • Since SYSTEM didn't work, is it possible to create as something else--perhaps Administrator, as you said? If so, how might I do so? thanks! – The Editor Jan 23 '23 at 03:29
  • Actually, I just re-created the tasks, and they suddenly work now. Something about the actions looked different on the previous tasks, but the current tasks work. Glad to have this new system! – The Editor Jan 24 '23 at 15:08