Configure Windows 10 Blue Light settings with PowerShell

As discussed in the previous post on configuring Lunar Calenders in Windows 10, another interesting feature was also introduced in the 15002 Windows 10 Build: Blue Light Settings. Recently more operating systems have included options for reducing the amount of blue light emitted after sundown. This is easier on your eyes and allows you to fall asleep better at night time.

There are a number of settings that can be configured in the Settings > Display > Blue light settings, settings menu. The settings that can be configured are as follows:

Because automation is a great thing and manually clicking through GUI interfaces is not always optimal I decided to write a PowerShell function to simplify the configuration. For example you could utilize this function to automatically disable the reduced blue light settings when color sensitive work is performed, or lower the amount of blue light emitted as the night progresses. These are some of the actions that the Set-BlueLight function can perform.

To instantly turn of the reduced blue light setting the following code can be run:

1
Set-BlueLight -DisableBlueLight

To enable the reduced color mode and set the color shift to Medium run the following code:

1
Set-BlueLight -EnableBlueLight -ColorTemperature MediumShift

To automatically reduce blue light emitted based on the Day and Night cycle in your geographical location execute this:

1
Set-BlueLight -EnableAutomaticSchedule

The values that are configured by the script are byte arrays in the registry, so it required a bit of reverse engineering to get the values to match the settings in the control panel. The function is currently available on GitHub in my Shared Scripts repository: Set-BlueLight

This function will be added to the CustomizeWindows10 module after I have developed my functional and unit tests to ensure the quality of this function.

For more information about the functions and modules discussed in this article, please refer to the following links:

Links in this Article
GitHub – Set-BlueLight
GitHub – CustomizeWindows10 Module
PowerShellGallery – CustomizeWindows10 Module

 

Share

5 thoughts on “Configure Windows 10 Blue Light settings with PowerShell

  1. Pingback: Configure Blue light settings in Windows 10 with PowerShell - How to Code .NET

  2. HP Printer Drivers Windows 10

    Thanks for sharing amazing automation script for windows 10. we are facing lots of issue regarding windows 10 in our enterprise network. Admin rights is one of them. If we added one user in administrator group, still he require “Run As Administrator” for some application to work properly . Is there any solution ?
    We have also faced issue with HP Printer Drivers Windows 10, But it resolve now.

    Reply
    1. Jaap Brasser Post author

      This depends on how you have UAC configured, you can set the shortcut for applications to ‘Run this program as an administrator’. Then if a program is started, UAC will prompt depending on your UAC settings. If prompting is disabled then no prompts are shown and the application is started as administrator.

      Regards,

      Jaap Brasser

      Reply
  3. zac

    Jaap, thanks for this. Any idea what the encoding on the values correlate to color wise? I am interested in being able to push the temperature all the way red for nighttime / astronomy purpose, which is impossible via the slider. Curious if this can be achieved via manual hex entry. Thanks.

    Reply

Leave a Reply to Jaap Brasser Cancel reply