Category filter

Script to change screen brightness on Mac

Users can change the brightness levels on macOS devices with the help of dedicated function keys or using the System Preferences. Despite these alternatives, administrators can directly run the Terminal commands to adjust brightness on Mac. Hexnode enables you to run these commands as scripts remotely using the Execute Custom Script action.


The sample scripts provided below are adapted from third-party open-source sites.


  1. This script requires Homebrew and the associated command-line brightness control tool to be installed on the devices.
  2. You can either use the Mac Live Terminal or the device’s built-in Terminal window to install them. The following set of commands helps you with it.

Change brightness

It turns the brightness level to 75%. You can change the value 0.75 as per your requirement.

To change the brightness level to 100%

To adjust the brightness to half-way


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.
  • The above scripts are supported only on Intel processor Macs.

  • Sample Script Repository