Skip to content

Instantly share code, notes, and snippets.

@Y-Koji
Created October 22, 2018 12:01
Show Gist options
  • Save Y-Koji/c43de0dbb89024b837cc01be05d0eb69 to your computer and use it in GitHub Desktop.
Save Y-Koji/c43de0dbb89024b837cc01be05d0eb69 to your computer and use it in GitHub Desktop.
[PowerShell] 画面輝度変更
$brightness = 30;
$timeout = 5;
[Console]::Write("Brightness[0-100%]> ");
$brightness = [int] [Console]::ReadLine();
Get-CimInstance -Namespace root/wmi -Class WmiMonitorBrightnessMethods |
Invoke-CimMethod -MethodName WmiSetBrightness -Arguments @{ Brightness = $brightness; Timeout = $timeout; } > $null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment