The Script Authoring Tool helps you quickly create new unattended setup scripts for Xbox One dev kits by choosing from a wide selection of predefined actions. This tool is available both in Xbox Device Portal (Windows Device Portal on Xbox) and in Xbox One Manager.
Figure 1. The main interface of the Script Authoring Tool in the Xbox Device Portal.

This topic contains the following sections:
The Script Authoring Tool is included in Xbox Device Portal (Windows Device Portal on Xbox) and is hosted in Xbox One Manager. To open the tool in the Xbox Device Portal, navigate to the Automation workspace in the menu on the left-hand side.
Figure 2. Workspaces in the Xbox Device Portal.

If you cannot find the Automation workspace, you can add the automation tools to a new workspace by doing the following:
To create a new script, click New script under Automation or your custom workspace. This clears the current script and resets Script Name to “New Script”. If you are already working on a script, consider either exporting or deploying the script that you are working on before clicking New script.
Caution Navigating to a different Xbox Device Portal workspace has the same effect as clicking the New script button. To avoid losing your work, open new workspaces in a new browser tab.
Script actions are individual automation tasks that you can combine to create a script. For a full list of available actions, see Unattended Setup Script Reference.
The script editor maintains a table of actions that you have already added. This table will be blank in a newly-created script. As you add new actions, new lines will be added to the table, as shown in the following figure.
Figure 3. The action table in the Script Authoring Tool.

To add a new action to a script, click New action. This displays the New action dialog box, which contains categorized lists of dozens of scriptable tasks and settings that you can add to your script. Choose a category, select the desired action from the list, and then click Next to finish adding the action to the script.
Figure 4. The New action dialog box.

To edit an existing action, click the name of the action in the table. Once you have created a script with several actions, you change the order in which the actions are executed by clicking the move up or move down link in the Actions column. To delete an action, click the delete link in the Actions column.
To save your script, click Export and then save the script using the standard file dialog. The script will be saved in a text file named “scriptname.xboxunattend” (note that the Export button is disabled if the script does not contain any actions). Saved scripts can later be imported and deployed to another console or a USB drive.
You can edit previously-exported scripts by importing them into the Script Authoring Tool. To import a script, click Import and then browse to the .xboxunattend file that contains the script.
To automatically run a script every time you reboot the dev kit, import the script into the tool and then click Apply as boot script. This copies the script to a command script on your dev kit named “xd:\boot\boot.cmd”. Every time the dev kit reboots, it will launch either Developer Home on the Console (Dev Home) (the default for dev kits) or the retail Home screen, depending on the preferences you have selected, and then run your boot script about 20-30 seconds later.
To remove the current boot script from the console, click Clear stored script. This button is active whenever the Xbox Device Portal is connected to a console that has a boot script deployed.
When the dev kit is rebooted, the system will display the following notification by default before the boot script is executed.
Figure 5. Boot script notification.

This notification allows you to abort a dangerous script. For example, a script that reboots the console is not a good choice for a boot script because that would result in an endless reboot loop. To abort a script, hold down the Xbox button on your controller when this notification appears.
The abort notification is enabled by default and adds a small amount of time to the startup sequence. To disable this notification, select the Run scripts immediately on startup option under the Unattended script settings tool.
The Xbox One X dev kit has a built-in front panel display with five programmable buttons. You can configure any of these buttons to perform a custom action whenever the button is pressed. This includes both built-in actions as well as custom actions that you create using the Script Authoring Tool.
To map a script to a button on the front panel, first click Add for front panel buttons in the Script Authoring Tool to copy the script to the dev kit. You can then follow the instructions in Mapping custom scripts to the buttons on the front panel to remap the button to your custom script. Note that this feature is displayed only when the Xbox Device Portal is connected to an Xbox One X dev kit.