> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XBOX Manager：管理主机自动化

> XBOX Manager：管理主机自动化

XBOX Manager 中的 Automation 选项卡（如以下截图所示）承载了 [XBOX Device Portal (Windows Device Portal on XBOX)](/tools/tools-console/wdp/wdp) 中用于无人参与脚本（以及 XBOX One X 开发套件和前面板脚本）的 UI。当连接到具有前面板显示屏的开发套件时，Automation 页面上会提供该显示屏，可用于远程测试和控制。仅当主机上启用了 [XBOX Device Portal](/tools/tools-console/wdp/wdp) 时，Automation 选项卡才可用。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=080245783f6f87b827ad7c1e44b73d1b" alt="XBOX Manager 中 Automation 选项卡的截图" width="833" height="948" data-path="images/gdk/tools/xbom_automation.png" />

<a id="ID4EDB" />

## 创建新脚本

1. 选择 **New script**（如下所示）。 <img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_new_script.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=dfd4b7b62383fd3f24b52f8bbc34cd2b" alt="New script 按钮截图" width="97" height="31" data-path="images/gdk/tools/xbom_automation_new_script.png" />

2. 输入新的脚本名称。默认名称为 **New Script**。

3. 向脚本添加新的操作。选择 **New action**（如下所示）。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_new_action.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=82ad621ec45cda33d97eb713f75b6020" alt="New action 按钮截图" width="98" height="30" data-path="images/gdk/tools/xbom_automation_new_action.png" />

1. 在出现的 **New action** 窗口中为脚本选择操作（如下所示），然后选择 **Next**。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_new_action_window.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=2ace9e85bab7f2349c6d729869c38979" alt="New action 窗口截图" width="465" height="373" data-path="images/gdk/tools/xbom_automation_new_action_window.png" />

1. 为操作设置任何参数（如下所示）。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_new_action_parameters.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=fd81a918cc6cd33dc3921cd8eb57ceaf" alt="新操作参数的截图" width="464" height="182" data-path="images/gdk/tools/xbom_automation_new_action_parameters.png" />

1. 重复步骤 3 至 5，向脚本添加更多操作。
2. 可选：若要将脚本设置为在启动时启动，请选择 **Apply as boot script**（如下所示）。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_apply_boot_script.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=7c7c520fcd4d1f9166a2cb593c0b6b8e" alt="Apply as boot script 按钮截图" width="126" height="30" data-path="images/gdk/tools/xbom_automation_apply_boot_script.png" />

1. 可选：若要将脚本应用到某个前面板按钮，请点击 **Add for front panel buttons**（如下所示），然后在 **System mappings for front panel buttons** 部分选择该脚本（如下所示）。

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_add_for_front_panel_buttons.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=d141efc3b04b95bac6fe798c619d7aa6" alt="Add for front panel buttons 按钮截图" width="165" height="31" data-path="images/gdk/tools/xbom_automation_add_for_front_panel_buttons.png" />

<img src="https://mintcdn.com/microsoft-4404708b/NsRUQ49ZRpXgoZ9R/images/gdk/tools/xbom_automation_mappings.png?fit=max&auto=format&n=NsRUQ49ZRpXgoZ9R&q=85&s=50e1a51df00dd71e293e944886db992f" alt="System mappings for front panel buttons 部分的截图" width="463" height="206" data-path="images/gdk/tools/xbom_automation_mappings.png" />

<a id="ID4EJD" />


## Related topics

- [XBOX Manager：管理主机和主机组](/zh-CN/tools/tools-console/xbom/manager-tool-groups.md)
- [XBOX Manager：管理主机设置](/zh-CN/tools/tools-console/xbom/manager-tool-console-settings.md)
- [XBOX Manager](/zh-CN/tools/tools-console/xbom/xbom.md)
- [脚本创作工具](/zh-CN/tools/tools-console/wdp/script-authoring-tool.md)
- [用于管理开发主机的 XBOX Manager 工具](/zh-CN/tools/tools-console/xbom/index.md)
