Set your laptop screen’s brightness level to desired percentage every time you logon

Set your laptop screen’s brightness level to desired percentage every time you Logon using Task Scheduler and Powershell in Windows 10/11.

Note: this only works on laptop built-in screens, not external monitors

Part 1: Create brightness.ps1 powershell file

1. Open Notepad
2. Copy paste the code from snippet below and change “95” to whatever desired level percentage you want to set it to between ( 0 – 100)

PowerShell
# Setting brightness to 95 in 1 Sec. Change 95 to your desired level (0-100)
(Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(1,95)

3. Save the file as brightness.ps1 under C:\ or your desired location as shows in below screenshot (remember this location as you will need it again task scheduler)


Part 2:  Setup Task Scheduler

Now, setup a task in Task Scheduler to run the previously created brightness.ps1. This scheduled task will run brightness.ps1 script file everytime we logon.

Open Task Scheduler application by typing “Task Scheduler” in Start Menu

In Task Scheduler window, click on Create Task… on the right Actions menu

This will open a new Create Task window

On the General Tab make changes as below:

1. Name: Brightness or whatever you want
2. Descrition: Whatever you want to call it
3. Change User to your current user (User account has to be administrator account)
4. Check “Run Whether user is logged on or not”
5. Check “Run with highest privileges” (important)”
6. Configure for: Windows 10

Now move to Triggers tab and Click New… to create a trigger:

On New… Trigger Window make the changes below

1. Begin the task: At log on
2. Select “Specific user”
3. Click Change User… to pick your account
4. Check “Enabled”
5. Click  OK

Now back to Create Task Window, Click on Actions tab and then click New… to create new action

On New Action window make the changes below:

1. Action: Start a program
2. Program/script: type powershell
3. Add arguments-noprofile -executionpolicy bypass -file c:\brightness.ps1
(change c:\brightness.ps1 to specify your location path if you saved your brightness.ps1 to different location)
4. Click OK

You will be taken back to Create Task window after clicking OK. Now, move to Conditions tab and make changes below:

1. Uncheck “Start the task only if the computer is on AC power”
2. Click OK

After hitting final OK, it will prompt for your username password. Go ahead enter your account information and hit OK.

You are now done!
There should be task named “Brightness” generated under your task lists now:

Now to test it, change your brightness level to different than setup in brightness.ps1 and restart your laptop. Once logged back in, it should automatically run the task and change the brightness level to desired percetage set in brightness.ps1