Created
September 28, 2021 11:12
-
-
Save ZackStone/b8f2533f271c1c11323a4112ff609497 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[int] $level | |
) | |
if ($level -eq 0) { | |
$level = $( Read-Host "Brightness level (0-100)" ) | |
} | |
write-host "Brightness level: $level" | |
(Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(1, $level) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment