I'm trying to find a way to set screen brightness programmatically. Some existing SO answers point to this article. However, when I try executing Powershell code from that article, I get errors:
Get-CimInstance -Namespace root/WMI -ClassName WmiMonitorBrightnessMethods
Get-CimInstance : Not supported At line:1 char:1 + Get-CimInstance -Namespace root/WMI -ClassName WmiMonitorBrightnessMe ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotImplemented: (root/WMI:WmiMonitorBrightnessMethods:String) [Get-CimInstance], CimExce ption + FullyQualifiedErrorId : HRESULT 0x8004100c,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
There must be some other way because there are programs that can do this.
P. S. I'm experimenting/developing on a desktop, but my target PC where I will actually use this feature is a tablet, so I'll prefer if I was actually able to control the backlight brightness rather than simply making the image darker.