az sphere device

Manage Azure Sphere devices.

Operation Description
az sphere device rescan-attached Show the number of attached devices.
az sphere device list-attached List all the attached devices.
az sphere device show-attached Show the details of the attached device.
az sphere device list List all the devices in your catalog, product, or device group.
az sphere device show-count Show the number of devices in your catalog, product, or device group.
az sphere device show Show details of an existing device in your resource group and catalog.
az sphere device assign Assign a device to a device group in your resource group and catalog.
az sphere device unassign Unassign a device from a device group in your resource group and catalog.
az sphere device restart Restart the attached device.
az sphere device claim Claim a device in your resource group and catalog.
az sphere device recover Use recovery mode to load new firmware onto the attached device.
az sphere device show-os-version Show the operating system version on the attached device.
az sphere device show-deployment-status Show the deployment status of the operating system on a device.
az sphere device enable-development "Enable a device for development by enabling sideloading and debugging on the attached device, and by assigning it to a device group that disables application updates from the cloud. By default, this will be the Development device group of the device's product, but other device groups can be specified. Not for use in manufacturing scenarios
az sphere device enable-cloud-test "Enable a device for testing cloud loading by disabling development and debugging on the attached device, and by assigning it to a device group that enables application updates from the cloud. By default, this will be the Field Test device group of the device's product, but other device groups can be specified. Not for use in manufacturing scenarios

Commands

az sphere device rescan-attached

Show the number of attached devices.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Examples

Show the number of attached devices.

az sphere device rescan-attached

az sphere device list-attached

List all the attached devices.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Examples

List all the attached devices.

az sphere device list-attached

az sphere device show-attached

Show the details of the attached device.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list

Examples

Show details of the attached device.

az sphere device show-attached

Show details of the specified device.

az sphere device show-attached --device <DeviceIdValue>

az sphere device list

List all the devices in your catalog, product, or device group.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--product -p The product name. Values from: az sphere product list
--device-group -dg The device group to show. Values from: az sphere device

Examples

List all devices in a resource group and catalog.

az sphere device list --resource-group MyResourceGroup --catalog MyCatalog

List all devices in a resource group, catalog, and product.

az sphere device list --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct

List all devices in a resource group, catalog, product, and device group.

az sphere device list --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --device-group MyDeviceGroup

az sphere device show-count

Show the number of devices in your catalog, product, or device group.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--product -p The product name. Values from: az sphere product list
--device-group -dg The device group to show. Values from: az sphere device

Examples

Show the number of devices in a resource group and catalog.

az sphere device show-count --resource-group MyResourceGroup --catalog MyCatalog

Show the number of devices in a resource group, catalog, and product.

az sphere device show-count --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct

Show the number of devices in a resource group, catalog, product, and device group.

az sphere device show-count --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --device-group MyDeviceGroup

az sphere device show

Show details of an existing device in your resource group and catalog.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list

Examples

Show details of a device using resource group, catalog name, and device ID.

az sphere device show --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

az sphere device assign

Assign a device to a device group in your resource group and catalog.

Required Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--target-product The name of the target product. Values from: az sphere product list
--target-device-group The name of the target device group. Values from: az sphere device
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Examples

Assign a device using resource group, catalog name, target product name, target device group name, and device ID.

az sphere device assign --resource-group MyResourceGroup --catalog MyCatalog --target-product MyProduct --target-device-group MyCurrentDeviceGroup --device <DeviceIdValue>

az sphere device unassign

Unassign a device from a device group in your resource group and catalog.

Required Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Examples

Unassign a device using resource group, catalog name, and device ID.

az sphere device unassign --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

az sphere device restart

Restart the attached device.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list

Examples

Restart the attached device.

az sphere device restart

Restart a specified device.

az sphere device restart --device <DeviceIdValue>

az sphere device claim

Claim a device in your resource group and catalog.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--product -p The product name. Values from: az sphere product list
--device-group -dg The device group to show. Values from: az sphere device

Examples

Claim a device using resource group, catalog name, and device ID.

az sphere device claim --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

Claim a device using resource group, catalog name, product name, device group name, and device ID.

az sphere device claim --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --device-group MyDeviceGroup --device <DeviceIdValue>

az sphere device recover

Use recovery mode to load new firmware onto the attached device.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--capability Filename of a device capability image to apply to the device during recovery. (Path).
--images Folder containing the image packages to write to the device. If not specified then the latest OS images are downloaded and used. (Path).

Examples

Recover an attached device.

az sphere device recover

Recover an attached device with specific capability and images.

az sphere device recover --capability myCapability.cap --images myImagesFolder

az sphere device show-os-version

Show the operating system version on the attached device.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list

Examples

Show the operating system version on the attached device.

az sphere device show-os-version

Show the operation system version on a specified device.

az sphere device show-os-version --device <DeviceIdValue>

az sphere device show-deployment-status

Show the deployment status of the operating system on a device.

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list

Examples

Show the deployment status of the operation system using resource group, catalog name, and device ID.

az sphere device show-deployment-status --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

az sphere device enable-development

"Enable a device for development by enabling sideloading and debugging on the attached device, and by assigning it to a device group that disables application updates from the cloud. By default, this will be the Development device group of the device's product, but other device groups can be specified. Not for use in manufacturing scenarios

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--enable-rt-core-debugging -r Install drivers required to debug applications running on a real-time core. Requires administrator permissions.
--product -p The product name. Values from: az sphere product list
--device-group -dg The device group to show. Values from: az sphere device

Examples

Enable a device for development by enabling sideloading and debugging using resource group, catalog name, device ID, and default Development device group.

az sphere device enable-development --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

Enable a device for development by enabling sideloading and debugging using resource group, catalog name, product name, device group name, and device ID.

az sphere device enable-development --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --device-group MyDeviceGroup --device <DeviceIdValue>

az sphere device enable-cloud-test

"Enable a device for testing cloud loading by disabling development and debugging on the attached device, and by assigning it to a device group that enables application updates from the cloud. By default, this will be the Field Test device group of the device's product, but other device groups can be specified. Not for use in manufacturing scenarios

Required Parameters

Parameter Description
--catalog -c The Azure Sphere Catalog in which to perform this operation. Specify Azure Sphere Catalog name. You can configure the default Azure Sphere Catalog using az config set defaults.sphere.catalog=<name>. Values from: az sphere catalog list.
--resource-group -r Name of the Azure resource group. You can configure the default group using az config set defaults.group=<name>. Values from: az group list.

Optional Parameters

Parameter Description
--device -d The device to run the command on when multiple devices are attached. Specify the ID, IP address, or Local Connection ID of an attached device. Values from: az sphere device list
--product -p The product name. Values from: az sphere product list
--device-group -dg The device group to show. Values from: az sphere device

Examples

Enable a device for testing cloud using resource group, catalog name, device ID, and default Field Test device group.

az sphere device enable-cloud-test --resource-group MyResourceGroup --catalog MyCatalog --device <DeviceIdValue>

Enable a device for testing cloud using resource group, catalog name, product name, device group name, and device ID.

az sphere device enable-cloud-test --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --device-group MyDeviceGroup --device <DeviceIdValue>