Skip to content

Instantly share code, notes, and snippets.

@ZackStone
Created September 28, 2021 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZackStone/b8f2533f271c1c11323a4112ff609497 to your computer and use it in GitHub Desktop.
Save ZackStone/b8f2533f271c1c11323a4112ff609497 to your computer and use it in GitHub Desktop.
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