Category filter

Script to hide Profiles pane from System Preferences on macOS devices

Being the IT administrator of a school or business organization, you might have requirements where you need to hide or disable the Profiles pane from System Preferences on your Mac endpoints. This way, you can prevent users from tampering with the installed profiles and avoid making any configuration errors on the devices. With Hexnode’s Execute Custom Script action, you can remotely hide/disable the Profiles pane on your devices using this bash script.

Scripting language – Bash

File extension – .sh


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

Script to disable Profiles pane

On running the above script, the Profiles pane will be greyed out from the System Preferences tab on the device.

For example, the following script will disable Bluetooth in addition to the Profiles pane:

Script to re-enable a disabled Profiles pane

To re-enable the disabled panes, run the below script on the endpoint devices.


The above scripts for disabling/re-enabling a disabled Profiles pane are applicable to macOS devices running version 10.2 and later.

Script to hide Profiles pane

By changing the key from DisabledPreferencePanes to HiddenPreferencePanes, you can configure the Profiles pane to be hidden rather than greyed out.

You can disable/hide any System Preferences pane using this script. All you have to do is identify the correct Bundle identifier for the required pane and include it in the script by following the correct syntax.

Script to unhide Profiles pane

Panes hidden earlier can be selectively revealed by running the Hide Profiles pane script, but with the package names of those panes removed. For instance, consider the script which hides both the Profiles pane and the Bluetooth pane:

Now, run the script below to reveal only the hidden Profiles pane.

To reveal all hidden panes under System Preferences, run the script provided below.


  • The above scripts for hiding/unhiding Profiles pane are applicable to macOS devices running version 13.0 and later.
  • 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