I have a second external display and am trying to set the display brightness using powershell.
I can easily set the brightness for the Primary (built-in) display, using the following:
# Get CIM object for Primary Display
$m = Get-CimInstance -Namespace root/WMI -ClassName WmiMonitorBrightnessMethods
# List Primary display's properties
$m | select *
# Set brightness and timeout of primary display object
Invoke-CimMethod $m -MethodName WmiSetBrightness -Arguments @{Brightness = 80; Timeout = 1}
However, I can see the same type of object using WmiMonitorDescriptorMethods, which shows both my displays.
# List ALL displays by InstanceName
Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorDescriptorMethods
# See details of each
$k = Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorDescriptorMethods
$k | select *
But I am not able to use the 2nd display instance (given by InstanceName).
How can I change the brightness of the 2nd display instance?
SetMonitorBrightnessFunctionAdd-Typethe class from this answer: stackoverflow.com/a/61417175/15339544 and use it to set all monitors brightness