PC

Important

XBOX Docs are now on docs.xbox.com! This page is kept as an archive and is no longer being updated. Visit our documentation on docs.xbox.com for the latest information and updates.

Visit the latest docs on docs.xbox.com

The pc commands get or switch the XBOX sandbox that this Windows PC uses. They're Experimental, and they run on Windows only. See Experimental commands.

A PC uses one sandbox at a time, for every user and every game on it, and games sign in to that sandbox. The default is RETAIL. To test a game in a development sandbox such as ABCDEF.1, switch the PC to it first. To see which sandboxes your Partner Center account has, use xbox sandbox list.

Commands

Each command runs XblPCSandbox.exe, the XBOX services PC Sandbox Switcher, and works the way its documentation describes.

Command Same as Description
pc sandbox get XblPCSandbox /get Get the sandbox this PC uses.
pc sandbox set <sandbox-id> XblPCSandbox /set <sandbox-id>, or /retail Switch this PC to a sandbox, by ID or number, or back to RETAIL.
pc sandbox launch-apps XblPCSandbox /launchApps Close and reopen the Microsoft Store and XBOX app in this PC's sandbox.

For the tool's /feedback command, run XblPCSandbox /feedback directly.

Switching sandboxes

xbox pc sandbox set ABCDEF.1 --confirm

pc sandbox set changes the sandbox for every user on the PC. It asks before it switches, then shows a User Account Control (UAC) prompt for administrator rights. It restarts the XBOX services on the PC, and reopens the Microsoft Store and XBOX app if they were open. Then it checks that the PC uses the new sandbox.

set switches even when the PC already uses the sandbox. Running it again restarts the services, which fixes sign-in that still uses the old sandbox. If that doesn't help, restart the PC and see Troubleshooting sandboxes.

Switch to RETAIL before you update the XBOX app or Gaming Services from the Microsoft Store.

Sandbox numbers

set also accepts a sandbox number, such as 2, and switches to that sandbox of your seller. A number needs you to be signed in and a seller from --seller-id or context; a sandbox ID needs neither. The command names the full ID before it switches.

xbox pc sandbox set 2 --seller-id 1234567 --confirm

Installing the tool

XblPCSandbox.exe ships with the XBOX Game Development Kit (GDK), and in XboxLiveTools.zip on the XBOX services development tools releases page. Gaming Services, the Windows service that runs XBOX features on the PC, must be installed. The CLI looks for the tool in this order:

  1. The XblPCSandbox:Path setting, such as the XBOX_XBLPCSANDBOX__PATH environment variable.
  2. The folder that contains the CLI.
  3. Each folder on PATH.

Options

Option Command Description
--confirm, --yes, -y set Switch without the confirmation prompt. Required outside an interactive terminal.
--no-apps set Don't reopen the Microsoft Store and XBOX app, like the tool's /noApps. Run launch-apps later to reopen them.
--seller-id <id> set The seller whose sandbox a sandbox number selects. Not used with a sandbox ID.
--output <format> all json (default), json-compact, or table.

Output

get and launch-apps return {"sandbox": "ABCDEF.1"}, and set returns {"sandbox": "ABCDEF.1", "previousSandbox": "RETAIL"}. With --output table, the columns are SANDBOX, and PREVIOUS SANDBOX for set. The tool's own output goes to stderr.

Errors

Cause What happens
The UAC prompt was declined The sandbox isn't changed.
Gaming Services is missing or not working The tool's output names the cause, and the error links to the Gaming Services Repair Tool.
The switch didn't take effect The tool reported success, but the PC uses another sandbox. Run the switch again, then restart the PC if it still fails.
The tool wasn't found The error says where the CLI looked and how to install the tool.
A sandbox number couldn't be resolved The PC isn't changed. Check your sign-in and --seller-id, or pass the full sandbox ID.
You pressed Ctrl+C The CLI stops the tool. If you'd accepted the UAC prompt, the switch might still finish; check with xbox pc sandbox get.

The tool's errors link to Troubleshooting sandboxes and suggest XblPCSandbox /feedback to report a problem.

Examples

Get the sandbox this PC uses:

xbox pc sandbox get

Switch to a development sandbox without reopening the Microsoft Store and XBOX app, then reopen them:

xbox pc sandbox set ABCDEF.1 --confirm --no-apps
xbox pc sandbox launch-apps

Switch back to RETAIL:

xbox pc sandbox set RETAIL --confirm