Block external storage devices using Mac custom scripts - How to

Block external storage devices by executing custom scripts on Mac machines


The usage of USB devices is inevitable in any organization. Data portability perks come as a package with the threat of data theft and malware injection. Hence, blocking the usage of USB devices fortifies the network from incidents of data breach.

Desktop Central offers several configurations to help you safeguard the Mac machines in your network. This document provides you with steps on preventing the usage of unauthenticated storage devices by executing custom script configuration.


Note : All the external storage devices will be blocked.


  1. Navigate to Configurations tab and click on Script Repository.
  2. Under Templates tab, add script to the repository.
  3. Create a custom script configuration under Mac configurations using this script.
  4. Click Add (next to Dependency Files) to upload the as the dependency file.
  5. If you want the USB devices to be blocked round the clock, the frequency should be set as 'During Every Startup' while deploying the configuration. While executing this as a startup script, the devices will be blocked from subsequent startup.

All the external storage devices have been blocked successfully.

Note: To unblock the external storage devices, either the configuration has to be deleted or the the target machine should be removed from the configuration. The changes will take effect after the next reboot of the target computer.