Set remote sharing prefs in terminal

remote desktopterminal

I am admin for department and I want to batch change the "show remote management status in menu bar" so that I don't have to log in to each machine and set it.

I have ARD so I can run a terminal command across all machines I just can't seem to find out how to set that option through the terminal

Could anyone tell me how to do that ? or if it's even possible ?

Best Answer

The easiest tool to set these settings programatically is the kickstart script that Apple ships:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help

Do read the help since, it warns This script can be used to grant very permissive incoming access permissions. Do not use the -activate and -configure features unless you know exactly what you're doing.

That being said, you will want to set a variable $ObserveUser for each user that should be shown a menu indication that screen observation is in progress:

sudo kickstart -configure -access -on -privs -ShowObserve -users $ObserveUser