# Command Line Utility

The Insight Student Command Line gives network administrators increased flexibility in managing Insight computers. These commands can be run with several different third-party enterprise management tools, such as Apple Remote Desktop, and/or central management solutions; this includes executing commands in Terminal while connected to a remote computer via SSH.

| Command                                                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--help`                                                                       | Display this help.                                                                                                                                                                                                                                                                                                                                                                                                               |
| `--password`                                                                   | <p>Provide the admin password to execute any command except --help.<br><br>Note: Providing the administrator password restricts command execution to authorized users only.</p>                                                                                                                                                                                                                                                  |
| `--settings`                                                                   | Display the current settings saved on this computer.                                                                                                                                                                                                                                                                                                                                                                             |
| `--uninstall`                                                                  | Uninstall Insight Student from this computer.                                                                                                                                                                                                                                                                                                                                                                                    |
| `--securityToken`                                                              | <p>Define the Access Token.</p><p></p><p>If supplied, the value can be passed as an environment variable by specifying '--env' at the end. </p><p></p><p>Example:</p><p><code>TOKEN="token" ADMINPSWD="password1" insightstudent --securityToken --adminPassword --env</code></p>                                                                                                                                                |
| `--adminPassword`                                                              | <p>Define the Insight admin password.</p><p></p><p>If supplied, the value can be passed as an environment variable by specifying '--env' at the end. </p><p></p><p>Example:</p><p><code>TOKEN="token" ADMINPSWD="password1" insightstudent --securityToken --adminPassword --env</code></p>                                                                                                                                      |
| `--connectorAddress "value"`                                                   | The value can be any valid IP address.                                                                                                                                                                                                                                                                                                                                                                                           |
| `--defaultClassId "Class ID"`                                                  | <p>Set the default Class ID to the value specified.</p><p>Note: If Class ID has space, the Class ID must be enclosed in quotes.</p><p></p><p>Example:</p><p><code>--defaultClassId "Home 100"</code></p>                                                                                                                                                                                                                         |
| `--menuBarIcon true \| false`                                                  | Show or hide the Insight Student icon in the menu bar.                                                                                                                                                                                                                                                                                                                                                                           |
| `--changeClassId true \| false`                                                | Enable or disable Students from changing the Class ID in Insight.                                                                                                                                                                                                                                                                                                                                                                |
| `--monitorKeystrokes true \| false`                                            | Enable or disable monitoring keystrokes                                                                                                                                                                                                                                                                                                                                                                                          |
| `--requirePermission true \| false`                                            | <p>When set to true, the Teacher will require permission from the Student to allow screen recording.</p><p></p><p>These settings can be found in:</p><ul><li>For macOS Ventura or newer: System Settings --> Privacy & Security</li><li>For macOS Monterey or older: System Preferences --> Security & Privacy --> Privacy</li></ul><p></p><p>The settings can be set using MDM solution, or set manually for each computer.</p> |
| `--webHistory true \| false`                                                   | <p>Enable or disable tracking the web history on Student machines.</p><p></p><p>Note: Enabling web history will also install the browser extension.</p>                                                                                                                                                                                                                                                                          |
| `--installBrowserExtension`                                                    | Setting this option will install the browser extensions on the Student system.                                                                                                                                                                                                                                                                                                                                                   |
| `--restrictWiFi "value1,value2..." \| --allowAllWiFi`                          | Enable the ability for Insight to restrict what wireless networks the system can connect to.                                                                                                                                                                                                                                                                                                                                     |
| `--classAutoExit 0 \| 30 \| 45 \| 60 \| 75 \| 90`                              | <p>Enable the ability for Insight to allow the Student to automatically exit the class after specified time. Valid values: 30, 45, 60, 75, 90 minutes.<br><br>Note: Supplying 0 will disable the ability to automatically exit the class.</p>                                                                                                                                                                                    |
| `--allowToExtendClass true \| false`                                           | Enable the ability for Insight to allow the Student to extend the class in 30-minute intervals.                                                                                                                                                                                                                                                                                                                                  |
| `--requireStudentApproval true \| false`                                       | Enable the ability for Insight to require the Student to give permission when the Teacher sends a request for the Student to join a class.                                                                                                                                                                                                                                                                                       |
| `--requirePrivacySettings "accessibility,microphone,screenrecording" \| false` | Enable the ability for Insight to require the Student to enable permissions for Privacy Settings when the Teacher sends a request for the Student to join a class.                                                                                                                                                                                                                                                               |

{% hint style="info" %}
Except for the `--help`, `--settings`, and `--uninstall` commands, the other commands may contain multiple options at the same time.
{% endhint %}

When password and/or token is specified, the command will prompt for the password and confirm it. Characters typed for the password and confirmation password will not be echoed on the Terminal.

In the event that command line is run with third-party management tool, the full path `/usr/local/bin/insightstudent` needs to be specified and the command has to be run as 'root' user.

When using third-party management tool, password and Access Token should be passed as environment variable by specifying `--env` at the end, to avoid having to enter the password and confirmation password. '`sudo`' should not be used because the command is already running as 'root'.

Sample command line scenarios:

<table data-full-width="false"><thead><tr><th>Terminal.app</th><th>Third-party management tool (executed as 'root' user)</th><th>Description</th></tr></thead><tbody><tr><td><code>sudo insightstudent --password "admin password" --settings</code></td><td><code>/usr/local/bin/insightstudent --password "admin password" --settings</code></td><td>Prints the current settings.</td></tr><tr><td><code>sudo insightstudent --password "admin password" --adminPassword</code></td><td><code>ADMINPSWD="new password" /usr/local/bin/insightstudent --password "admin password" --adminPassword --env</code></td><td>Sets the new admin password and enters the password and confirmation at the prompt.</td></tr><tr><td><code>sudo insightstudent --password "admin password" --securityToken</code></td><td><code>TOKEN="token" /usr/local/bin/insightstudent --password "admin password" --securityToken --env</code></td><td>Sets the Access Token and enters the token and confirmation at the prompt.</td></tr><tr><td><code>sudo insightstudent --password "admin password" --adminPassword --defaultClassId "Home 100" --menuBarIcon false --changeClassId true --connectorAddress "192.168.0.1"</code></td><td><code>ADMINPSWD="new password" /usr/local/bin/insightstudent --password "admin password" --adminPassword --defaultClassId "Home 100" --menuBarIcon false --changeClassId true --connectorAddress "192.168.0.1" --env</code></td><td>Combines multiple options to set new admin password, default class ID, menu bar icon and Insight Connector IP address.</td></tr><tr><td><code>sudo insightstudent --password "admin password" --uninstall</code></td><td><code>/usr/local/bin/insightstudent --password "admin password" --uninstall</code></td><td>Uninstalls Insight Student.</td></tr></tbody></table>
