Category filter
Script to enable/disable AirDrop on Mac
AirDrop is a built-in feature that allows users to wirelessly transfer various data and files between nearby Macs, iPhones, and iPods. AirDrop feature offers a seamless experience with the quick transfer of data and files between Apple devices. However, AirDrop functionality becomes critical for security and compliance strategies in a corporate environment. Disabling AirDrop functionality significantly reduces risk by restricting file transfers via AirDrop to personal or other Apple devices. It will prevent data leakage, and admins can have full control over users’ file sharing on Apple devices. This level of restriction is crucial in a corporate environment where security and data privacy are top priorities.
You can restrict AirDrop functionality by executing dedicated terminal commands. This doc provides you with scripts that can be used to disable or re-enable AirDrop functionality on macOS devices. You can execute these scripts remotely on Macs with the help of Hexnode’s The Execute Custom Scripts feature.
Script to disable AirDrop functionality
Execute this script to disable the AirDrop functionality:
1 2 3 |
#!/bin/sh sudo ifconfig awdl0 down |
Script to enable AirDrop functionality
The following script helps you to re-enable AirDrop functionality:
1 2 3 |
#!/bin/sh sudo ifconfig awdl0 up |
What happens at the device end?
Once the “Disable AirDrop” script is executed, the AirDrop functionality will be disabled on the device’s end. This will prevent the user from turning on AirDrop and prohibit data and file transfers through AirDrop. However, it enhances security by restricting unauthorized file transfers.
Upon running the “Enable AirDrop” script, users will retain the privileges to control AirDrop functionality as needed. It allows them to wirelessly transfer data and files to nearby Apple devices.