Apple Remote Desktop- How to send Terminal Command to Networked computers I'm hoping that you can help me with creating a unix script for sending a terminal command through ARD to multiple networked computers. I'm hoping to disable air drop on a set of 36 lab computers at my school. I can definitely manually enter the script below to turn off air drop, but it would be great if I could just do this "behind the scenes" and 36 at a time. 

The script that works is:

 defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES


I have limited knowledge of scripting/UNIX/ARD, but I'd love to learn. So far, all I've gotten is for terminal to open:
    open /Applications/Utilities/Terminal.app

However, I cannot get the script/text to run. Any help is greatly appreciated! Thanks,
Don't bother with Terminal; ARD can run shell commands directly on the computers. Just select the computers you want to run it on, click the UNIX button in the toolbar (or choose Manage menu > Send UNIX Command). A window will open that lets you paste in the command/script you want to run, and select what user to run it as.

But it's a little more complicated than that, because you're changing a per-user setting. If you run the command as root, it'll only take effect if someone logs in as root, which (hopefully) nobody ever does. If you select "Current console user on target computer", it'll run as whoever's logged in at the moment, if someone's logged in. Do you have multiple users using the same computer and/or logging out between usages? If so, it's going to get set for some users but not others.

I think this short script will work to set the setting for all current user accounts (everyone with a home directory in /Users) and also adjust the user templates so that new users will get this setting as well. Note that this script must be run as root, and won't take effect for current users until they log out &amp; back in.

# Disable AirDrop for current users
for userdir in /Users/*; do
    if [ -d "$userdir/Library" ]; then # only do this for "real" users
        sudo -u "${userdir##*/}" defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES
    fi
done

# Disable AirDrop in the user templates, so new user accounts come with it pre-disabled
for templatedir in "/System/Library/User Template"/*; do
    defaults write "$templatedir/Library/Preferences/com.apple.NetworkBrowser" DisableAirDrop -bool YES
done


WARNING: I have not tested this script. Try it out on one or a few computers that you can clean up or reimage easily if something goes wrong.