# prb device command reference

Manage ITAM devices. This page documents **8 commands** under `prb device`.

Flags and examples below come from the command definitions. A **Required** flag is explicitly marked required by Cobra; an unmarked flag can still be needed by runtime validation or a non-interactive workflow. Empty strings and empty lists are registered defaults, not sample values.

Every command also inherits the [global flags](/docs/developers/cli/commands#global-flags). Run `prb <command> --help` to check your installed version. Replace placeholder IDs and names in source examples before running them. Return to the [complete CLI command reference](/docs/developers/cli/commands) to browse another command.

## Commands

| Command                                         | Description                                        | Usage                         | Source                                                                                                       |
| ----------------------------------------------- | -------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [`prb device`](#prb-device)                     | Manage ITAM devices.                               | `prb device <command>`        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/device.go#L36)              |
| [`prb device create`](#prb-device-create)       | Create a PENDING ITAM device and enrollment token. | `prb device create`           | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/create/create.go#L64)       |
| [`prb device delete`](#prb-device-delete)       | Delete one or more revoked ITAM devices.           | `prb device delete <id>...`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/delete/delete.go#L50)       |
| [`prb device download`](#prb-device-download)   | Download device evidence as a PDF.                 | `prb device download <id>...` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/download/download.go#L49)   |
| [`prb device list`](#prb-device-list)           | List ITAM devices in an organization.              | `prb device list`             | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/list/list.go#L146)          |
| [`prb device revoke`](#prb-device-revoke)       | Revoke one or more ITAM device enrollments.        | `prb device revoke <id>...`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/revoke/revoke.go#L56)       |
| [`prb device set-owner`](#prb-device-set-owner) | Set or clear the owner of an ITAM device.          | `prb device set-owner <id>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/set-owner/set_owner.go#L59) |
| [`prb device view`](#prb-device-view)           | View an ITAM device.                               | `prb device view <id>`        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/view/view.go#L100)          |

## prb device

Manage ITAM devices.

### Usage

```text
prb device <command>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/device.go#L36).

## prb device create

Create a PENDING ITAM device and enrollment token.

### Usage

```text
prb device create
```

Accepts no positional arguments.

### Flags

| Flag      | Type   | Default | Required | Description      |
| --------- | ------ | ------- | -------- | ---------------- |
| `--org`   | string | `""`    | —        | Organization ID  |
| `--owner` | string | `""`    | —        | Owner profile ID |

### Examples

```bash
# Create a device for the default organization
prb device create

# Create a device with an owner
prb device create --owner <profile-id>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/create/create.go#L64).

## prb device delete

Delete one or more revoked ITAM devices.

### Usage

```text
prb device delete <id>...
```

Requires at least 1 positional arguments.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

### Examples

```bash
# Revoke devices, then delete them
prb device revoke <device-id> [<device-id>...]
prb device delete <device-id> [<device-id>...]
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/delete/delete.go#L50).

## prb device download

Download device evidence as a PDF.

### Usage

```text
prb device download <id>...
```

Requires at least 1 positional arguments.

### Flags

| Flag             | Type    | Default | Required | Description                          |
| ---------------- | ------- | ------- | -------- | ------------------------------------ |
| `--json`         | boolean | `false` | —        | Output JSON (same as --output json)  |
| `--output`, `-o` | string  | `""`    | —        | Output format: json, table (default) |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/download/download.go#L49).

## prb device list

List ITAM devices in an organization.

### Usage

```text
prb device list
```

Accepts no positional arguments.

### Flags

| Flag                 | Type        | Default  | Required | Description                                                                                 |
| -------------------- | ----------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
| `--after`            | string      | `""`     | —        | Cursor from the previous page (the Next cursor line)                                        |
| `--agent-version`    | string list | `[]`     | —        | Filter by agent version; repeat or comma-separate for multiple                              |
| `--json`             | boolean     | `false`  | —        | Output JSON (same as --output json)                                                         |
| `--limit`, `-L`      | integer     | `30`     | —        | Maximum number of devices to list                                                           |
| `--order-by`         | string      | `""`     | —        | Order by field (CREATED_AT, UPDATED_AT, HOSTNAME, LAST_SEEN_AT)                             |
| `--order-direction`  | string      | `"DESC"` | —        | Sort direction (ASC, DESC)                                                                  |
| `--org`              | string      | `""`     | —        | Organization ID                                                                             |
| `--output`, `-o`     | string      | `""`     | —        | Output format: json, table (default)                                                        |
| `--platform`         | string list | `[]`     | —        | Filter by platform; repeat or comma-separate for multiple (DARWIN, LINUX, FREEBSD, WINDOWS) |
| `--posture-warnings` | boolean     | `false`  | —        | Only devices whose latest posture for some check is FAIL or UNKNOWN                         |
| `--postures`         | boolean     | `false`  | —        | Include latest posture check results                                                        |
| `--query`            | string      | `""`     | —        | Search devices by owner name                                                                |
| `--state`            | string list | `[]`     | —        | Filter by state; repeat or comma-separate for multiple (PENDING, ACTIVE, REVOKED)           |

### Examples

```bash
# List devices in the default organization
prb device list

# List devices with latest posture check results
prb device ls --postures

# List devices sorted by last seen time
prb device ls --order-by LAST_SEEN_AT --output json

# Search devices by owner name
prb device ls --query "Ada"

# List active macOS devices
prb device ls --state ACTIVE --platform DARWIN

# List active and pending devices
prb device ls --state ACTIVE --state PENDING
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/list/list.go#L146).

## prb device revoke

Revoke one or more ITAM device enrollments.

### Usage

```text
prb device revoke <id>...
```

Requires at least 1 positional arguments.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

### Examples

```bash
prb device revoke <device-id> [<device-id>...]
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/revoke/revoke.go#L56).

## prb device set-owner

Set or clear the owner of an ITAM device.

### Usage

```text
prb device set-owner <id>
```

Requires 1 positional argument.

### Flags

| Flag      | Type   | Default | Required | Description                       |
| --------- | ------ | ------- | -------- | --------------------------------- |
| `--owner` | string | `""`    | —        | Owner profile ID (empty to clear) |

### Examples

```bash
# Assign an owner
prb device set-owner <device-id> --owner <profile-id>

# Clear the owner
prb device set-owner <device-id> --owner ""
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/set-owner/set_owner.go#L59).

## prb device view

View an ITAM device.

### Usage

```text
prb device view <id>
```

Requires 1 positional argument.

### Flags

| Flag             | Type    | Default | Required | Description                          |
| ---------------- | ------- | ------- | -------- | ------------------------------------ |
| `--json`         | boolean | `false` | —        | Output JSON (same as --output json)  |
| `--output`, `-o` | string  | `""`    | —        | Output format: json, table (default) |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/device/view/view.go#L100).
