Jesus Vigo demonstrates how to query asset management reports and execute terminal commands remotely using Apple Remote Desktop (ARD).
My personal philosophy to systems management is to "work smarter, not harder." It's been my professional mantra for almost two decades in IT, and it has served me well. In fact, it's been the driving force in pushing me to learn new ways of doing things.
What does this have to do with Apple Remote Desktop (ARD), you ask? It's simple. ARD allows one to "work smarter" by leveraging the technology, network infrastructure, and remote capabilities to execute commands on one or 1,000 nodes at the same time. This level of flexibility, combined with the scalability of ARD, allows for the management suite to grow with the enterprise.
Ultimately, as usage increases, you'll notice certain types of tasks are performed regularly — perhaps even daily — while others are only necessary when performing security auditing or planning for equipment upgrade cycles.
- Launch Remote Desktop.app from the Applications folder.
- Select the computer(s) you wish to query a report on (Figure A).
- Click the Reports button from the taskbar (Figure B).
- The Reports window will open for further configuration, including but not limited to scheduling for later execution or saving as a template for future queries by clicking the Schedule... and Save buttons respectively (Figure C).
- The System Overview Report is just one of 14 built-in report templates in ARD. Selecting the report name will show the list from the drop-down menu (Figure D).
- Once a report template has been selected, further customization can be performed by drilling-down in each category. Checking specific fields will include data from that component in the report. When all desired fields have been selected, click the Get Report button to generate a report based on your settings (Figure E).
- Reports are generated in real time unless they're scheduled for a later date. Depending on the field's selected and online status of the computer(s), reports can take a few minutes to generate. Once completed, the categories selected in step #6 will appear as tabs within the reporting window. The All tab includes all the data culled from the devices selected in a concise, easy-to-view format (Figure F).
- Queried data may be exported to .TXT format by clicking the Export button and selecting a location to save the file to. Using the Field Separator drop-down, Tab or Comma separators may be used when formatting the data for importing into a 3rd-party application or database. Clicking the Save button will commit the changes and create the file (Figure G).
- Data may also be printed out if a hard copy is needed for record keeping. The Print button, located in the upper-left corner, will prompt to save the file as a PDF or print the document out (Figure H).
Now, let's review Remote Command execution, also known as running UNIX or terminal commands.
II. Remote commands (UNIX)
- Launch Remote Desktop.app from the Applications folder.
- Select the computer(s) you wish to query a report on (Figure I).
- Click the UNIX button from the taskbar (Figure J).
- The Send UNIX Command window will open to manually enter or select a command to send to a remote computer. Commands may be scheduled for a later time, like a maintenance window, or saved as a template for future use. Clicking the Schedule... or Save buttons performs those functions respectively (Figure K).
- By clicking the drop-down next to Templates, pre-configured templates for variety of management tasks may be selected for execution on remote systems. Additionally, you can edit and customize the following templates for your environment by selecting Edit Templates List: Network Setup (Figure L), System Setup (Figure M), and Miscellaneous (Figure N).
- For the purposes of this tutorial, I've taken the liberty of selecting a very common task from the Miscellaneous section: Download All Software Updates (Figure O).
- With the template selected, the accompanying command will appear in the command line window, and the Run command as: section will display the administrative user to run the command as. By default, root will be chosen, however any user account with administrative privilege may be used (Figure P).
- After clicking the Send button, the command will be sent across the network to the destination computer(s) and executed remotely. The status of the command execution will be visible by clicking on the task under the Active Tasks section of the navigation pane. Once completed, a confirmation report will appear with the output of the remote terminal command if the checkbox for Display all output was checked next to the Command results in step #7 (Figure Q).
- Typically, when running the command selected in step #6 above, the node will download all software updates but not install them until a later time. Another common command to execute is complimentary to the previous one chosen. Entering "software -i -a" (no quotes) and clicking the Send button will cause the computer to install all software updates currently pending installation (Figure R).
- While the task is in process, the status may be viewed by clicking on the task in the Active Tasks pane. Like most tasks, the time it takes to process a command successfully will vary greatly on factors such as network congestion and local resources in use on the destination stations (Figure S).
- Upon successful completion, the task will generate a report detailing the output from the remote terminal. These reports may be exported or printed for further review, as needed (Figure T).
ARD is a versatile solution that can provide many IT departments with a lightweight, agile means with which to manage networks of Mac computers. Interfacing with Automator, for example, ARD can fully automate the execution of repetitive administrative tasks.
Not only is ARD robust enough to scale according to the needs of the environment, but it retains all the simplicity that one has come to expect from an Apple product. It's this powerful combination that frees up the systems admin to focus on alternative projects that might require less of a personal touch — again, working smarter instead of harder.