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

# Workspace ONE

> Deploy Unbound to Windows devices with Workspace ONE UEM

Workspace ONE UEM runs one PowerShell script on a schedule. Devices stay onboarded, and a device whose setup has drifted gets put back on the next run. You do not need a detection script, because the schedule does that job.

## Before you begin

* Push Python 3 as an app first, with `InstallAllUsers=1 PrependPath=1 Include_launcher=1`. The script runs as SYSTEM, and a per-user install is not on SYSTEM's PATH.
* Allow HTTPS to `getunbound.ai`, `raw.githubusercontent.com`, `github.com`, `codeload.github.com`, and the hosts after `-BackendUrl` and `-GatewayUrl` in your install command.

***

## 1. Copy the command

Sign in to your Unbound dashboard and open **Configure**. On a dedicated deployment, that is your own address rather than `gateway.getunbound.ai`. Under **Choose scope** select **My org (MDM)**, then under **Run the install command** select the **Windows** tab and copy the command. It looks like this, with your own key and URLs:

```powershell theme={null}
Invoke-WebRequest -Uri "https://getunbound.ai/setup/mdm/windows/onboard" -OutFile onboard.ps1; .\onboard.ps1 -ApiKey YOUR_ADMIN_API_KEY -BackendUrl https://backend.getunbound.ai -GatewayUrl https://api.getunbound.ai -FrontendUrl https://gateway.getunbound.ai -Backfill
```

Two parts of it matter here. The value after `-ApiKey` is your admin API key. One key covers the whole fleet, and each device uses it to fetch its own device key. The dashboard masks it on screen but copies it in full. The switches after the key point devices at your deployment. `-Backfill` shows up only when **Seed events from past activity** is on in Configure.

***

## 2. Add the script

In the Workspace ONE UEM console go to **Resources → Scripts → Add → Windows**.

**1. General**

**Name**: `Unbound daily onboard`. Select **Next**.

**2. Details**

**Language**: PowerShell. **Execution Context**: **System**. **Execution Architecture**: **64-bit**. **Timeout**: `18000`, which is five hours in seconds. The first run includes a discovery scan that can take hours on a large machine, and a shorter timeout kills it partway through. Paste this as the script:

```powershell theme={null}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$ErrorActionPreference = 'Stop'
if (-not $env:UnboundApiKey) { throw 'UnboundApiKey variable is not set.' }
$f = "$env:TEMP\unbound-onboard-$(Get-Random).ps1"
Invoke-WebRequest -Uri 'https://getunbound.ai/setup/mdm/windows/onboard' -OutFile $f -UseBasicParsing
Set-ExecutionPolicy -Scope Process Bypass -Force -ErrorAction SilentlyContinue
& $f -ApiKey $env:UnboundApiKey YOUR_SWITCHES
exit $LASTEXITCODE
```

Replace `YOUR_SWITCHES` with the switches that follow your key in the command from step 1, for example `-BackendUrl https://backend.getunbound.ai -GatewayUrl https://api.getunbound.ai -FrontendUrl https://gateway.getunbound.ai -Backfill`. That keeps the URLs and `-Backfill` matched to what Configure gave you. Leave `-ApiKey $env:UnboundApiKey` alone. The key comes from the variable in the next step. If you forget to replace `YOUR_SWITCHES`, the installer rejects it and the run shows **Failed**, so a missed edit cannot quietly point devices at the wrong place.

**3. Variables**

Add one variable. **Key**: `UnboundApiKey`. **Value**: your admin API key from step 1. Select **Save**.

Workspace ONE hands variables to the script as environment variables, so the key stays out of the script body.

The script downloads the same installer your Configure command uses and runs it in the same process with your switches. Workspace ONE gets the installer's exit code back, so each run shows as Executed or Failed in the console. The key comes from the variable, so it never sits in the script body or on another process's command line. The installer deletes itself when it finishes.

***

## 3. Assign it

Open the script and select **Assign → New Assignment**.

**1. Definition**

**Assignment Name**: `Unbound daily onboard`. Under **Select Smart Group**, choose your developer device group.

**2. Deployment**

Under **Triggers** select **Schedule** and set the interval to **24 hours**. Also select the **Run Immediately** event, so devices already enrolled run it at their next check-in instead of waiting a day. Select **Save**.

***

## 4. Verify

> [card] Workspace ONE
>
> Open the device under **Devices → List View**, then the **Scripts** tab. The **Status** column shows **Executed** for `Unbound daily onboard`. **Failed** means the exit code was not 0. Open the row to read the output.

> [card] [Unbound](https://gateway.getunbound.ai/settings?tab=devices)
>
> Devices appear on **Settings → Devices**, and show a recent **Last Sync** on AI Tools Discovery.

***

## Troubleshooting

| Symptom | Fix |
| - | - |
| `UnboundApiKey variable is not set` | Add the variable on the script's **Variables** tab, with the key `UnboundApiKey` spelled exactly like that. |
| `A positional parameter cannot be found that accepts argument 'YOUR_SWITCHES'` | Replace `YOUR_SWITCHES` in the script with the switches from your Configure command. |
| `401` or `403` from the backend | The key was rotated. Copy the command from Configure again and update the variable's value. |
| `Python 3 is required but not found in PATH` | Re-deploy Python with `InstallAllUsers=1 PrependPath=1 Include_launcher=1`, then reboot. |
| `Could not download` or a `404`/`403` on `raw.githubusercontent.com` | The installer fetches its Python stage from GitHub. Allow `raw.githubusercontent.com` through your proxy, including TLS inspection. |
| Status shows **Failed** | Open the device's **Scripts** tab and read the output. The installer prints which step failed. |
| Status shows **Failed** with output that stops during **Discovery** | The script hit its **Timeout**. Confirm it is `18000` (five hours). |
| Copilot rows show `auto` | Allow one daily cycle. Sessions VS Code has already rotated cannot be read. |

***

## Command switches

| Switch | Purpose | Default |
| - | - | - |
| `-ApiKey <key>` | Your admin API key. Required unless `-Clear` | none |
| `-BackendUrl <url>` | Where setup results and scans are reported | `https://backend.getunbound.ai` |
| `-GatewayUrl <url>` | The AI gateway the installed tools point at | `https://api.getunbound.ai` |
| `-FrontendUrl <url>` | Your dashboard host, written into each user's config | `https://gateway.getunbound.ai` |
| `-Backfill` | Import past Claude Code, Codex and GitHub Copilot sessions | off |
| `-SkipManagedSettings` | Claude Code only: install the hook, leave its managed settings to you. See [Tamper Resistance](https://docs.getunbound.ai/mdm-integrations/tamper-resistance.md#when-your-claude-code-policy-is-managed-elsewhere) | off |
| `-Clear` | Remove the configuration for every tool | off |

***

## Remove Unbound

Remove the script's assignment first, or the next scheduled run reinstalls. Then, in an elevated PowerShell on the device:

```powershell theme={null}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$f = "$env:TEMP\unbound-onboard-$(Get-Random).ps1"
Invoke-WebRequest -Uri 'https://getunbound.ai/setup/mdm/windows/onboard' -OutFile $f -UseBasicParsing
Set-ExecutionPolicy -Scope Process Bypass -Force -ErrorAction SilentlyContinue
& $f -Clear
```

On a dedicated deployment, add the `-BackendUrl` and `-GatewayUrl` switches from your install command after `-Clear`.

> [card] [Tamper Resistance](https://docs.getunbound.ai/mdm-integrations/tamper-resistance.md)
>
> Keeping Unbound active on every device with managed settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.