Note: This has not been fully tested since macOS 10.15, but was working as of Ventura 13.4.1
A gem to help create and organize commands in Apple Remote Desktop
Add this line to your application's Gemfile:
gem 'ARD'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ARD
The gem is available as open source under the terms of the MIT License.
- you have Apple Remote Installed on the local machine
- you run this script in the user account that uses Apple Remote Desktop
- for clarity and to avoid name collisions, all folders and commands you create should have unique names otherwise you can receive errors when trying to delete or move folders or commands
- it assumes you already have a file at ~/Library/Containers/com.apple.RemoteDesktop/Data/Library/Application Support/Remote Desktop/Presets/UnixCommandTask.plist, if you don’t open Apple Remote Desktop, click on “Unix” and save anything as your first command .. this auto generates the UnixCommandTask.plist file
See this blog post
puts ARD.list_options
This will return:
- create_command
- create_folder
- create_spacer
- delete_command
- delete_folder
- folder_index
- list_folders
- move_command
- move_folder
- options
- rename_command
- rename_folder
puts ARD.list_folders
returns any existing single commands or folders in ARD
argument is ("new_folder_name")
ARD.create_empty_folder("folder1")
puts ARD.folder_index("folder1")
returns the physical position of folder "folder1" as an integer
arguments are ("commandname", "folder to move to")
ARD.move_command("Test Command", "Folder 1")
arguments are (original_position, new_position)
ARD.move_folder(1, 0)
arguments are (oldname, newname)
ARD.rename_folder("folder1", "folder0")
arguments are (folder_name, orignialcommandname, newcommandname)
ARD.rename_command("folder0", "command2", "command1")
arguments is physical location you want to create the spacer
ARD.create_spacer(1)
arguments are (oldname, newname)
ARD.rename_folder("folder1", "folder0")
arguments are ("folder_name", "orignialcommandname", "newcommandname")
ARD.rename_command("Admin Commands", "list of users", "all users")
arguments are ("folder_name", "command_name")
ARD.delete_command("folder2", "command1")
arguments are ("foldername")
ARD.delete_folder("folder2")