Category filter

Script to hide/disable different System Preferences panes on Mac

System administrators may have requirements to disable the different panes in System Preferences on an employee’s Mac to prevent users from making unwanted changes. While in some cases, simply hiding the unnecessary panes may do the trick. With Hexnode’s Execute Custom Script action, admins can remotely hide or disable any System Preferences pane by executing the bash scripts below.

Scripting Language – Bash

File extension – .sh


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Script to Disable any System Preferences Pane

You can disable any System Preferences panes by specifying the correct CFBundleIdentifier in the script above.

For example, executing the following script will grey out the Bluetooth pane from System Preferences, thus preventing the users from tampering with the Bluetooth settings.

To disable multiple System Preferences panes, specify the CFBundleIdentifiers of those preference panes in succession. For example, to disable both Bluetooth and Network from System Preferences:

To re-enable the disabled preference panes, execute the script below:

Script to Hide any System Preferences Pane

You can also hide the unnecessary preference panes instead of greying them out. This comes handy when you want to clean up the System Preferences window by displaying only the required system settings to the user.

For example, the following script will hide the Bluetooth pane from System Preferences:

To unhide the hidden preference panes, execute the script below:


  • 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.
  • Sample Script Repository