Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WmiSetBrightness method sets the display brightness of a computer monitor.
uint32 WmiSetBrightness(
uint32 Timeout,
uint8 Brightness
);
Timeout
Timeout, in seconds.
Brightness
Brightness, in percent.
Returns zero (0) to indicate success. Any other number indicates an error. For more information about error codes, see WMI Error Constants or WbemErrorEnum.
For an extended discussion of retrieving and setting monitor brightness, see the Scripting Guy's Use PowerShell to Report and Set Monitor Brightness blog topic.
The following PowerShell sample sets the brightness of the monitor to 50%.
$brightness = 50
$delay = 5
$myMonitor = Get-WmiObject -Namespace root\wmi -Class WmiMonitorBrightnessMethods
$myMonitor.wmisetbrightness($delay, $brightness)
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Namespace |
Root\wmi |
MOF |
|
DLL |
|
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today