# 命令行工具

Insight Student 命令行提高了网络管理员管理 Insight 计算机的灵活性。可使用多个不同的第三方企业管理工具（例如 Apple Remote Desktop）和/或中央管理解决方案运行这些命令；这包括在通过 SSH 连接到远程计算机时在终端执行命令。

| 命令                                                    | 说明                                                                                                                                                                                                                  |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--help`                                              | 显示此帮助。                                                                                                                                                                                                              |
| `--password`                                          | <p>提供管理员密码才能执行除 --help 以外的任何命令。</p><p></p><p>注意：提供管理员密码可限制仅授权用户才能执行命令。</p>                                                                                                                                          |
| `--settings`                                          | 显示保存在此计算机上的当前设置。                                                                                                                                                                                                    |
| `--uninstall`                                         | 从该计算机卸载 Insight Student。                                                                                                                                                                                            |
| `--securityToken`                                     | <p>设置访问令牌。</p><p></p><p>如果提供了该值，则可以在末尾指定 '--env'，将其作为环境变量传递。</p><p> </p><p>示例：</p><p><code>TOKEN="token" ADMINPSWD="password1" sudo insightstudent --securityToken --adminPassword --env</code></p>                 |
| `--adminPassword`                                     | <p>定义 Insight 管理员密码。</p><p></p><p>如果提供了该值，则可以在末尾指定 '--env'，将其作为环境变量传递。</p><p> </p><p>示例：</p><p><code>TOKEN="token" ADMINPSWD="password1" sudo insightstudent --securityToken --adminPassword --env</code></p>       |
| `--connectorAddress "value"`                          | 该值可以是任何有效的 IP 地址。                                                                                                                                                                                                   |
| `--defaultClassId "Class ID"`                         | <p>将默认班级 ID 设置为指定值。</p><p></p><p>注意：如果班级 ID 有空格，则班级 ID 必须用引号括起来。</p><p> </p><p>示例：</p><p><code>--defaultClassId "Home 100"</code></p>                                                                               |
| `--menuBarIcon true \| false`                         | 在菜单栏中显示或隐藏 Insight Student 图标。                                                                                                                                                                                      |
| `--changeClassId true \| false`                       | 启用或禁用学生在 Insight 中更改班级 ID。                                                                                                                                                                                          |
| `--monitorKeystrokes true \| false`                   | 启用或禁用按键监控。                                                                                                                                                                                                          |
| `--requirePermission true \| false`                   | <p>设置为 true 时，教师需要获得学生的许可才能进行屏幕录制。</p><p></p><p>这些设置可参见：</p><ul><li>对于 macOS Ventura 或更新版本：系统设置 --> 隐私和安全性</li><li>对于 macOS Monterey 或更旧版本：系统偏好设置 --> 安全和隐私 --> 隐私</li></ul><p>可以使用 MDM 解决方案进行设置，也可以为每台计算机手动设置。</p> |
| `--webHistory true \| false`                          | <p>启用或禁用跟踪学生计算机上的网络历史记录。</p><p></p><p>注意：启用网络历史记录还将安装浏览器扩展程序。</p>                                                                                                                                                   |
| `--installBrowserExtension`                           | 设置此选项将在学生系统上安装浏览器扩展程序。                                                                                                                                                                                              |
| `--restrictWiFi "value1,value2..." \| --allowAllWiFi` | 启用 Insight 限制系统可连接的无线网络的功能。                                                                                                                                                                                         |
| `--classAutoExit 0 \| 30 \| 45 \| 60 \| 75 \| 90`     | <p>启用 Insight 功能，允许学生在指定时间后自动退出课堂。有效值：30, 45, 60, 75, 90 分钟。</p><p>                                                                                                                                                 |
| <br>注意：输入 0 将关闭自动退出课堂功能。</p>                          |                                                                                                                                                                                                                     |
| `--allowToExtendClass true \| false`                  | <p>启用 Insight 功能，允许学生以 30 分钟为单位延长课堂。                                                                                                                                                                                |

<br></p>                                                                                                                                                                      |
| `--requireStudentApproval true \| false`                                       | 启用 Insight 功能，要求学生在收到教师的入班请求时必须授权。                                                                                                                                                                                  |
| `--requirePrivacySettings "accessibility,microphone,screenrecording" \| false` | 启用 Insight 功能，要求学生在收到教师的入班请求时开启隐私设置权限。                                                                                                                                                                              |

{% hint style="info" %}
除了 `--help`、`--settings` 和 `--uninstall` 命令外，其他命令可以同时包含多个选项。
{% endhint %}

指定密码和/或令牌后，命令将提示输入密码并确认。输入的密码字符和确认密码字符不会在终端上显示出来。

如果使用第三方管理工具运行命令行，则需要指定完整路径 `/usr/local/bin/insightstudent`，且须以"root" 用户身份运行命令。

使用第三方管理工具时，应在末尾指定 `--env`，将密码和访问令牌作为环境变量传递，以避免输入密码和确认密码。不应使用 "`sudo`"，因为该命令已经以 "root" 身份运行。

命令行场景示例：

<table data-full-width="false"><thead><tr><th>Terminal.app</th><th>第三方管理工具（以 'root' 用户身份执行）</th><th>说明</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>打印当前设置。</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>设置新的管理员密码，根据提示输入密码并确认。</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>设置访问令牌，根据提示输入令牌和确认信息。</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>结合多个选项设置新的管理员密码、默认班级 ID、菜单栏图标和 Insight Connector IP 地址。</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>卸载 Insight Student。</td></tr></tbody></table>

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.faronics.com/faronics-insight-docs/chinese/an-zhuang-he-guan-li/an-zhuang/zai-macos-shang-an-zhuang/delete-copy-of-an-zhuang-insight-student/ming-ling-xing-gong-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
