device

Manages Azure Sphere devices.

Operation Description
app Changes the status of applications on a device.
capability Manages device capabilities.
certificate Manages device certificate store.
claim Claims a previously unclaimed device to the Azure Sphere tenant.
enable-cloud-test Sets up a device to disable debugging and receive updates.
enable-development Sets up a device for local debugging.
image Manages images for a device.
list Displays all devices in the tenant.
list-attached Lists the attached devices.
manufacturing-state Manages the manufacturing state of the attached device.
network Provides information about the status of network interfaces on the device.
recover Uses special recovery mode to load new firmware onto the device.
rescan-attached Rescans attached devices as a troubleshooting aid (Windows only).
restart Restarts the attached device.
show Displays details about the update configuration of the device.
show-attached Displays details about the attached device from the device itself.
show-count Shows the total number of devices in a tenant.
show-deployment-status Displays the status of the most recent deployment update.
show-os-version Displays the local device operating system version.
sideload Loads an image onto the attached device.
update Updates a device by placing it in a specific device group.
wifi Manages the Wi-Fi configuration for the device.

app

Manages applications on the device.

Many of the app options require the appDevelopment capability, which can be acquired by using azsphere device enable-development. To start, stop, or debug an SDK-signed application or a production-signed application, the device must have the appDevelopment capability.

You can use azsphere device app stop and azsphere device app start to restart a running real-time capable application to determine which real-time core it is running on.

Operation Description
show-memory-stats Displays the the memory statistics for applications on the attached device.
show-quota Displays the amount of storage used by the current application on the device.
show-status Returns the status of the current application on the device.
start Starts the application that is loaded on the device.
stop Stops the application that is running on the device.

app show-memory-stats

Shows the memory statistics for applications on the attached device. This command is available only if the appDevelopment device capability is configured. Additional information is shown if heap memory allocation tracking is configured.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device app show-memory-stats
 -------------- -------------
 Name           Usage (bytes)
 ============================
 Total          434176
 User Mode      147456
 Peak User Mode 147456
 -------------- -------------

app show-quota

Displays the amount of mutable storage allocated and in use on the attached device.

You set the mutable storage quota in the application manifest, and the Azure Sphere OS enforces quotas when it allocates sectors for the file. As a result, if you decrease the MutableStorage value, the amount of storage in use will not change, but the allocated value reported will be different. For example, if the application has already used 16 KB and you change the MutableStorage value to 8, the command reports that the application uses 16 KB of 8 KB allocated. The data remains on the device.

Optional parameters

Parameter Type Description Supported version
-i, --component-id GUID Specifies the ID of the component for which to get quota information. If omitted, shows quota information for all the components. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-i, --componentid GUID Specifies the ID of the component for which to display status. If omitted, shows quota information for all the components. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device app show-quota
ae4714aa-03aa-492b-9663-962f966a9cc3: 0KB out of 8KB of mutable storage used.

app show-status

Displays the current status of the applications on the device.

Optional parameters

Parameter Type Description Supported version
-i, --component-id GUID Specifies the ID of the component for which to display status. If omitted, shows status of all components. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-i, --componentid GUID Specifies the ID of the component for which to display status. If omitted, shows status of all components. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device app show-status
9ce57001-90eb-45e1-bd0a-4fc07b0c85c9
App state: running

app start

Starts applications on the device.

Optional parameters

Parameter Type Description Supported version
--debug-mode Boolean Starts the application for debugging. The '--component-id' must be provided. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-i, --component-id GUID Specifies the ID of the component to start. If omitted, starts all applications. Azure Sphere CLI
-d, --debug Boolean Starts the application for debugging. The --componentid must be provided. Azure Sphere classic CLI
-i, --componentid GUID Specifies the ID of the component to start. If omitted, starts all applications. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device app start
836cbcf1-0b4d-45ab-963a-eadcd5017b6a
App state: running
Core     : High-level

app stop

Stops the applications on the device.

Optional parameters

Parameter Type Description Supported version
-i, --component-id GUID Specifies the ID of the component to stop. If omitted, stops all applications. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-i, --componentid GUID Specifies the ID of the component to stop. If omitted, stops all applications. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device app stop
836cbcf1-0b4d-45ab-963a-eadcd5017b6a
App state: stopped

capability

Manages device capabilities. Device capabilities determine the operations that can be performed on an individual Azure Sphere device.

The device capabilities are downloaded as a file from the Azure Sphere Security Service using the azsphere device capability download command, device capability configuration can be applied to the attached Azure Sphere device using the azsphere device capability update command, and a servicing session can be created using the azsphere device capability select command. For more information on device capabilities, see Device capabilities and communication.

Operation Description
download Downloads a device capability configuration from the Azure Sphere Security Service.
select Selects a downloaded capability file to use for a servicing session.
show-attached Displays the capability configuration for the attached device.
update Applies a device capability configuration to the attached device.

capability download

Downloads a device capability from the Azure Sphere Security Service.

The appDevelopment capability lets you sideload SDK-signed applications and start, stop, debug, or delete any application on the device. Without the appDevelopment capability, only cloud-loaded applications can be loaded and start, stop, debug, and delete are prohibited. The appDevelopment capability is applied as part of the azsphere device enable-development command.

Downloading the fieldServicing capability results in a file containing the capability for a single Azure Sphere device. The fieldServicing capability file is downloaded to your local computer and can be used in conjunction with the azsphere device capability select command.

Required parameters

Parameter Type Description Supported version
--type Capability-type Specifies the type of device capability to download. Values are appDevelopment, fieldServicing, or none. Use none to remove the appDevelopment capability or the fieldServicing capability. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
--destination String Specifies the path and filename at which to save the capability configuration. Include an absolute or relative path. If you do not provide a path, the command will store the file in the local directory using the naming convention <capability type>-<first eight characters of device ID>.cap. Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-p, --apply - Applies the device capability configuration to the attached device. Do not use with --deviceid or --output. Azure Sphere classic CLI
-s, --select - Temporarily selects the device capability configuration for the attached device. Azure Sphere classic CLI
-i, --deviceid GUID Specifies the ID of the device for which to get the capability configuration. If you specify a device ID, you must also use --output. If omitted, gets a capability for the attached device. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-o, --output String Specifies the path and filename at which to save the capability configuration. Include an absolute or relative path. If you do not provide a path, the command will store the file in the local directory using the naming convention <capability type>-<first eight characters of device ID>.cap. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device capability download --type appDevelopment
The appdevelopment capability was saved as:
 --------------------------------------------
 Result
 ============================================
 C:\capability-file\appdevelopment-<first eight characters of device ID>.cap
 --------------------------------------------

capability select

Selects a capability file to use with the attached Azure Sphere device.

The azsphere device capability select command can be used with any capability, but is most often used with the fieldServicing capability to enable a servicing session. Any user role has access to the azsphere device capability select command.

When you use the fieldServicing capability, communication is enabled between the Azure Sphere device and the local computer containing the capability file. The fieldServicing capability file is used for a session between the local computer and the Azure Sphere device, and each command in the session is prepended with a message indicating the capability file in use.

To end a servicing session, use azsphere device capability select --none.

Optional parameters

Parameter Type Description Supported version
--capability-file String Specifies the path and filename to the device capability configuration file to select. You can provide a relative or absolute path. Azure Sphere CLI
-n, --none - Clears any previously selected device capability configuration. - Azure Sphere CLI
- Azure Sphere classic CLI
-f, --filepath String Specifies the path and filename to the device capability configuration file to select. You can provide a relative or absolute path. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device capability select --capability-file appdevcap
The capability session uses C:\capability-file\appdevcap.

capability show-attached

Displays the capability configuration stored on the attached device.

Note

The command displays the capabilities configured using a capability file and some, but not all, capabilities present by default on boards.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device capability show-attached
 --------------------
 DeviceCapabilities
 ====================
 EnableFieldServicing
 --------------------
azsphere device capability show-attached
 --------------------
 DeviceCapabilities
 ====================
 EnableAppDevelopment
 --------------------

capability update

Applies a device capability configuration to the attached device.

Required parameters

Parameter Type Description Supported version
--capability-file String Specifies the path and filename of the device capability file to apply. You can provide a relative or absolute path. Azure Sphere CLI
-f, --filepath String Specifies the path and filename of the device capability file to apply. You can provide a relative or absolute path. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device capability update --capability-file appdevcap.bin
Using selected capability file: C:\capability-file\appdevcap.bin
The capability file C:\capability-file\appdevcap.bin was added on the device. The device will restart.

certificate

Manages certificates on the attached device.

Operation Description
add Adds a certificate to the certificate store on the attached device.
delete Deletes a certificate from the attached device's certificate store.
list Lists the certificate IDs that are available in the attached device's certificate store.
show Displays details of a certificate in the attached device's certificate store.
show-quota Displays the available free space in the attached device's certificate store.

certificate add

Adds a certificate to the certificate store of the attached device.

The Root CA and client certificates must be in the .pem format to load onto the Azure Sphere device. You will need to acquire the Root CA certificate from the appropriate server, along with the client certificate and private key (and optionally a password for your private key) for your device. Each certificate must be generated and signed by the appropriate server in your EAP-TLS network. Your network administrator or security team can supply the details you need to get the certificates. For more information on acquiring the Root CA certificate see, Acquire and deploy certificates for EAP-TLS networks.

Caution

Because certificate IDs are system-wide for both client and Root CA certificates, an azsphere command or a function call that adds a new certificate can overwrite a certificate that was added by an earlier command or function call, potentially causing network connection failures. We strongly recommend that you develop clear certificate update procedures and choose certificate IDs carefully.

See Certificate IDs for more information.

Required parameters

Parameter Type Description Supported version
-i, --cert-id String Specifies the identifier of the certificate to add. A string identifier (up to 16 characters). Valid characters include uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), underscore (_), period (.), and hyphen (-). This identifier is also used in Wi-Fi configurations for EAP-TLS networks. Azure Sphere CLI
--cert-type String Specifies the type of certificate to add, either "client" or "rootca". Azure Sphere CLI
-p, --public-key-file String Specifies the path to a public key certificate .pem file. You can provide a relative or absolute path. Azure Sphere CLI
-i, --certid String Specifies the identifier of the certificate to add. A string identifier (up to 16 characters). Valid characters include uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), underscore (_), period (.), and hyphen (-). This identifier is also used in Wi-Fi configurations for EAP-TLS networks. Azure Sphere classic CLI
-t, --certtype String Specifies the type of certificate to add, either "client" or "rootca". Azure Sphere classic CLI
-pubk, --publickeyfilepath String Specifies the path to a public key certificate .pem file. You can provide a relative or absolute path. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
--private-key-file String Specifies the path to a client private key certificate .pem file. Required when adding a certificate of type "client". You can provide a relative or absolute path. Azure Sphere CLI
-w, --private-key-password String Specifies an optional password for the client private key. The password is required when adding a client certificate private key that is encrypted. Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-prvk, --privatekeyfilepath String Specifies the path to a client private key certificate .pem file. Required when adding a certificate of type "client". You can provide a relative or absolute path. Azure Sphere classic CLI
-pwd, --privatekeypassword String Specifies an optional password for the client private key. The password is required when adding a client certificate private key that is encrypted. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device certificate add --cert-id certroot --cert-type rootca --public-key-file publiccert.pem
Certificate 'certroot' successfully added.
azsphere device certificate add --cert-id certclient --cert-type client --private-key-file privatekey.pem --private-key-password 1234 --public-key-file publiccert.pem
Certificate 'certclient' successfully added.

certificate delete

Deletes a certificate from the attached device's certificate store.

Required parameters

Parameter Type Description Supported version
-c, --certificate
or
--cert-id [Deprecated]
String Specifies the identifier of the certificate to delete. The --cert-id argument has been deprecated and will be removed in a future release. For more information, see Important changes (deprecations) in Azure Sphere CLI. Azure Sphere CLI
-i, --certid String Specifies the identifier of the certificate to delete. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device certificate delete --certificate certclient

certificate list

Lists the certificates available in the device's certificate store.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device certificate list
 -----------
 Identifiers
 ===========
 rootCert
 -----------

certificate show

Shows details of an individual certificate in the device's certificate store.

Required parameters

Parameter Type Description Supported version
-c, --certificate
or
--cert-id [Deprecated]
String Specifies the identifier of the certificate for which to show the details. The --cert-id argument has been deprecated and will be removed in a future release. For more information, see Important changes (deprecations) in Azure Sphere CLI. Azure Sphere CLI
-i, --certid String Specifies the identifier of the certificate for which to show the details. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device certificate show --certificate certclient
---------- ------------------- ------------------- ----------------------------------- -----------------------------------
 Id         StartDate           EndDate             SubjectName                         IssuerName
 ==========================================================================================================================
 certclient 06/08/2019 19:15:48 06/08/2069 19:25:44 /DC=local/DC=azsphere/CN=azsphereca /DC=local/DC=azsphere/CN=azsphereca
 ---------- ------------------- ------------------- ----------------------------------- -----------------------------------

certificate show-quota

Displays the available free space in the attached device's certificate store.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device certificate show-quota
--------------
Available space (bytes)
==============
24514
--------------

claim

Claims a previously unclaimed device for the current Azure Sphere tenant.

Important

Before you claim the device, ensure that you are signed in to the correct Azure Sphere tenant. A device can be claimed only once. Once claimed, a device cannot be moved to a different tenant.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
--force Boolean Forces a device to be claimed in the current user's selected Azure Sphere tenant. - Azure Sphere CLI
- Azure Sphere classic CLI
-i, --deviceid GUID Specifies the ID of the device to claim. If omitted, azsphere claims the attached device. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device claim
warn: You are claiming a device to the following tenant:
warn: a323c263-2aa3-2559-aabb-a3fc32631900 (Tenant1)
warn: Do you want to claim the device ID 352fe1f59e40ef8a9266415e81af32b5b07d8f2bbd6b5650cef4a70b86c7fcbc70b129a41fbc6d02f8bb4aaabc52cd5740c85427d205e46a166b7e41135eb968 to this tenant?
warn: You cannot change the Azure Sphere tenant this device is claimed to once this action has completed.
Enter 'yes' to continue. Enter anything else to exit.
> yes
Claiming device.
Successfully claimed device ID '352fe1f59e40ef8a9266415e81af32b5b07d8f2bbd6b5650cef4a70b86c7fcbc70b129a41fbc6d02f8bb4aaabc52cd5740c85427d205e46a166b7e41135eb968' into tenant 'Tenant1' with ID 'a323c263-2aa3-2559-aabb-a3fc32631900'.

enable-cloud-test

Readies the attached device for testing cloud loading by disabling application development, deleting any existing applications, and enabling cloud-loaded application updates.

It requires a device to be attached to the PC and operates only on the attached device.

Specifically, enable-cloud-test:

  • Removes the appDevelopment capability for the attached device
  • Assigns the device to a device group that enables cloud-loaded application updates
  • Reboots the device

The specific tasks that enable-cloud-test performs depend on whether a product and device group have already been assigned for this device.

If azsphere device enable-cloud-test is run without parameters, the device will be placed in the "Field Test" device group of the device's current product. This is one of the default device groups created automatically for each product, which enables application updates. An error will be given if the device doesn't have a product, or a "Field Test" device group doesn't exist within it.

If a product is specified, the device will be placed in the "Field Test" device group of that product. An error will be given if this device group doesn't exist.

If a device group is specified, the device will be placed in it. An error will be given if the target device group doesn't enable application updates.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-p, --product GUID or name Specifies the target product. When this is specified, the device will be moved to the default Field Test device group of this product, unless --device-group is also specified. You can specify either the ID or name of the Azure Sphere product. Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-g, --device-group GUID or name Specifies the device group to which the device will be moved. You can specify either the device group ID or the device group name. To use the device group name, you must provide both the product name and device group name in the <product-name/device-group-name> format.. By default, this is the 'Field Test' device group of the product. Azure Sphere CLI
-dgi, --devicegroupid GUID Specifies the ID of the device group to which to assign the device. If omitted, assigns the device to a default group that enables application updates. Cannot be used with --devicegroupname. Azure Sphere classic CLI
-dgn, --devicegroupname String Specifies the name of the device group. Use with --productname to apply command to a device group, or use --devicegroupid. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-pi, --productid GUID Specifies the ID of an existing product to apply to the device. If specified, the device will be moved to the default "Field Test" device group of this product, unless --devicegroupname is also specified. Azure Sphere classic CLI
-pn, --productname String Specifies the name of an existing product. Use with --devicegroupname to specify a device group within the product, or use --devicegroupid. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

Example 1. Assign device to existing device group by its ID

This example assigns the attached device to an existing product and device group.

azsphere device enable-cloud-test --device-group '3548b179-m16f-4f64-6dme-d3c643662e76'
Your internal capabilities will be retained, including the Enable App development capability. Sideloaded images may be removed by over-the-air application updates.
Getting device group by ID '3548b179-m16f-4f64-6dme-d3c643662e76'.
Leaving any existing applications on the device.
Setting device group to 'Field Test' with ID '3548b179-m16f-4f64-6dme-d3c643662e76')
Successfully updated device's device group.
Successfully set up device for application updates.
(Device ID: 'ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABCD')

Example 2. Assign device to different device group

This example is similar to the preceding example, but retains the existing product for the device. Here the enable-cloud-test operation changes the device group to which the device belongs and removes the appDevelopment capability. This command is useful for moving a device from a development environment that does not enable application updates to a production environment that does.

azsphere device enable-cloud-test --device-group "Marketing/Field Test"

Example 3. Assign device by product name

This example enables cloud loading and assigns the device to a product by name.

azsphere device enable-cloud-test --product DW100

enable-development

Enables a device for development by enabling sideloading and debugging on the 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. Do not use in manufacturing scenarios. See Manufacturing connected devices for more information.

Specifically, enable-development:

  • Downloads and applies the appDevelopment capability for the attached device.
  • Assigns the device to a device group that does not enable cloud-loaded application updates.
  • Reboots the device.

If you run the azsphere device enable-development command with no parameters:

  • If the device doesn't already have a product or device group, the command downloads and applies the appDevelopment capability for the attached device, and reboots the device. Any existing apps remain on the device, and the OS is updated. Therefore, the install process to claim your device and the Quickstart to build a high-level application will be unaffected.
  • If the device already has a product, the command moves the device to the product's Development device group. By default, application updates are disabled for this group, thus ensuring that sideloaded apps are not overwritten.

If you run the azsphere device enable-development command with the --product parameter:

  • Places the device in the "Development" device group for the product. An error occurs if this device group doesn't exist.

If you run the azsphere device enable-development command with the --device-group parameter:

  • Places the device in the specified device group is specified. The target device group must not enable application updates; if the device group enables application updates, an error occurs.

In some cases, azsphere device enable-development reports an error and suggests that you claim the device. If you have already claimed the device, use azsphere tenant show-selected to ensure that you are logged in to the tenant in which you claimed the device. If not, use azsphere login to log into the correct tenant. When you're sure you're logged into the appropriate tenant, use azsphere device claim to claim the device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-g, --device-group GUID or name Specifies the device group to which the device will be moved. If omitted, assigns the device to a default group. You can specify either the device group ID or the device group name. To use the device group name, you must provide both the product name and device group name in the <product-name/device-group-name> format. Azure Sphere CLI
-r, --enable-rt-core-debugging Boolean Installs drivers required to debug applications running on a real-time core. This option requires administrator permissions. Azure Sphere CLI
-p, --product GUID or name Specify the target product. When this is specified, the device will be moved to the default Development device group of this product, unless --device-group is also specified. You can specify either the ID or name of the Azure Sphere product. Azure Sphere CLI
-dgi, --devicegroupid GUID Specifies the ID of a device group that does not apply over-the-air application updates. If omitted, assigns the device to a default group. Azure Sphere classic CLI
-dgn, --devicegroupname String Specifies the name of the device group. Use with --productname to apply command to a device group, or use --devicegroupid. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-r, --enablertcoredebugging - Installs drivers required to debug applications running on a real-time core. This option requires administrator permissions. Azure Sphere classic CLI
-pi, --productid GUID Specifies the ID of an existing product to apply to the device. If specified, the device will be moved to the default "Development" device group of this product, unless --devicegroupname is also specified. Azure Sphere classic CLI
-pn, --productname String Specifies the product name. Use with --devicegroupname to apply command to a device group, or use --devicegroupid. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device enable-development
Capability configuration has been successfully cleared.
PS C:\Users\v-shypr> azsphere device enable-development
Getting device group 'Development' for product 'DW100'.
The device already has the 'Enable App development' capability. No changes will be applied to its existing capabilities.
Setting device group to 'Development' with ID '7f860cc1-4949-4000-a541-9a988ba4c3cd'.
Successfully disabled application updates.
Installing debugging server to device.
Deploying 'C:\Program Files (x86)\Microsoft Azure Sphere SDK\DebugTools\gdbserver.imagepackage' to the attached device.
Image package 'C:\Program Files (x86)\Microsoft Azure Sphere SDK\DebugTools\gdbserver.imagepackage' has been deployed to the attached device.
Previous device capabilities retained. Ensure that you have the correct development capabilities installed before continuing.
Successfully set up device for application development, and disabled application updates.
(Device ID: '352fe1f59e40ef8a9266415e81af32b5b07d8f2bbd6b5650cef4a70b86c7fcbc70b129a41fbc6d02f8bb4aaabc52cd5740c85427d205e46a166b7e41135eb968')

image

Returns information about the images that are installed on or targeted to the attached device.

Operation Description
list-installed Provides details about the images that are currently installed on the attached device
list-targeted Provides details about the images that are targeted to the attached device.

image list-installed

Lists the images that are installed on the attached device. The list of information includes the component and image IDs.

Note

Long image names will be truncated at 31 characters.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-f, --full Boolean Lists all software images that are installed on the device. By default, lists only application images, debuggers, and board configuration images. - Azure Sphere CLI
- Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device image list-installed
Installed images:
 --> gdbserver
   --> Image type:   Application
   --> Component ID: 8548b129-b16f-4f84-8dbe-d2c847862e78
   --> Image ID:     dc6205bd-4478-4c9b-81ad-5e41ac23ed68
 --> CrashApplicatio
   --> Image type:   Application
   --> Component ID: 9ce57001-90eb-45e1-bd0a-4fc07b0c85c9
   --> Image ID:     cc77124e-6447-4c0f-9f99-fc0ad5ef46ef

image list-targeted

Lists the images that have been uploaded to the Azure Sphere Security Service and will be installed when the device is updated. For more information on ensuring that your Azure Sphere device is ready to accept cloud-based application updates, see Enable cloud-based deployment for your device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-f, --full Boolean Lists all images in your Azure Sphere tenant. - Azure Sphere CLI
- Azure Sphere classic CLI
-i, --deviceid GUID Specifies the ID of the device for which to list targeted images. Lists images for the currently attached device by default. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device image list-targeted
 ----------------------- ------------------------------------ ------------------------------------ ------------
 Name                    ComponentId                          ImageId                              ImageType
 ==============================================================================================================
 HelloWorld_HighLevelApp 1689d8b2-c835-2e27-27ad-e894d6d15fa9 50419cb6-a33b-4cbe-8bd0-425048664b6f Applications
 ----------------------- ------------------------------------ ------------------------------------ ------------

list

Lists all devices in a tenant. The list truncates after first 500 devices.

Optional parameters

Parameter Type Description Supported version
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-o, --output String Specifies the location and filename for exporting the list results. Azure Sphere classic CLI
-si, --showids Boolean Specifies if device IDs should be included in the results. Azure Sphere classic CLI
-ni, --noninteractive Boolean Displays all devices by turning on non-interactive mode. List will automatically continue after each page of results. This parameter is useful for automation and for piping results to a .csv file. Use with --output to save results to a file. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device list
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ -------- ------------------------------------ ------------------------------------
 DeviceId                                                                                                                         TenantId                             ChipSku  ProductId                            DeviceGroupId
 ========================================================================================================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968 a323c263-2aa3-2559-aabb-a3fc32631900 MT3620AN 4f48d618-09f7-45dc-a5a4-1433cabbee91 6f52bead-700d-4289-bdc2-2f11f774270e
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ -------- ------------------------------------ ------------------------------------
 ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABCD a323c263-2aa3-2559-aabb-a3fc32631900 MT3620AN 4f48d618-09f7-45dc-a5a4-1433cabbee91 6f52bead-700d-4289-bdc2-2f11f774270e
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ -------- ------------------------------------ ------------------------------------

You can use the --query parameter to customize the output displayed for this command. For more information, see Query CLI command output.

The following example shows how to select just the Device ID and Product ID:

azsphere device list --query '[].{DeviceId:deviceId, ProductId:productId}'
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------
 DeviceId                                                                                                                         ProductId
 =====================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968 4f48d618-09f7-45dc-a5a4-1433cabbee91
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------
 ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABDFAC6466B573A0FF9ABA38BABCD40ABCD 4f48d618-09f7-45dc-a5a4-1433cabbee91
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------

Tip

Run the azsphere product show --product <product-ID> to view the product name or the azsphere device-group show --device-group <devicegroup-ID> to view the device group name.

list-attached

Lists the devices attached to the local PC.

Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device list-attached
1 device attached:
--> Device ID: 352fe1f59e40ef8a9266415e81af32b5b07d8f2bbd6b5650cef4a70b86c7fcbc70b129a41fbc6d02f8bb4aaabc52cd5740c85427d205e46a166b7e41135eb968
  --> Is responsive: yes
  --> IP address: 192.128.48.1
  --> Connection path: 21143

manufacturing-state

Manages the manufacturing state of the attached device.

Operation Description
show Displays the manufacturing state of the attached device.
update Updates the manufacturing state of the attached device.

Caution

Manufacturing state changes are permanent and irreversible.

manufacturing-state show

Displays the manufacturing state of the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device manufacturing-state show
------------------
ManufacturingState
==================
Module1Complete
------------------

manufacturing-state update

Updates the manufacturing state of the attached device. For more information, see Set the device manufacturing state.

Caution

Manufacturing state changes are permanent and irreversible.

Required parameters

Parameter Type Description Supported version
-s, --state Manufacturing states Specifies the manufacturing state to set for the device. Possible states are: DeviceComplete and Module1Complete. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device manufacturing-state update --state Module1Complete
Updating manufacturing state to Module1Complete.
Restarting device for changes to take effect.
The device was successfully restarted.

network

Provides information about the status of network interfaces on the attached device.

Operation Description
enable Enables a network interface on the attached device.
disable Disables a network interface on the attached device.
list-firewall-rules Lists the firewall rules for the attached device.
list-interfaces Lists the network interfaces for the attached device.
proxy Manages the networking proxy settings.
show-diagnostics Shows network diagnostics for one or all wireless networks on the attached device.
show-status Shows the network status for the attached device.
update-interface Updates a network interface configuration for the device.

network enable

Enables a network interface on the attached device.

Note

This command is supported for configuring Ethernet eth0 and wlan0 connections. An error will be reported if you configure lo or azspheresvc.

Required parameters

Parameter Type Description Supported version
--interface string Specifies the interface to enable. Azure Sphere CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network enable --interface wlan0
Network interface configuration is successfully applied to the device.
Run the command 'azsphere device network list-interfaces' to view details of the network interfaces for the attached device.

network disable

Disables a network interface on the attached device.

Note

This command is supported for configuring Ethernet eth0 and wlan0 connections. An error will be reported if you configure lo or azspheresvc.

Required parameters

Parameter Type Description Supported version
--interface string Specifies the interface to enable. Azure Sphere CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network disable --interface wlan0
Network interface configuration is successfully applied to the device.
Run the command 'azsphere device network list-interfaces' to view details of the network interfaces for the attached device.

network list-firewall-rules

Lists the firewall rules for the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI

The following rules are displayed:

  • Firewall Ruleset Name: Displays the name of the firewall ruleset block.
    • The values are PREROUTING, INPUT, FORWARD, and OUTPUT.
  • Is Ruleset Valid: Displays the status of the ruleset. The values are True or False.
  • Firewall Ruleset Rules: Displays the values for the following rules:
    • Source IP: Displays the IP address of the sending machine.
    • Source Mask: Displays the network mask of the sending machine.
    • Destination IP: Displays the IP address of the destination machine.
    • Destination Mask: Displays the network mask of the destomation machine.
    • UID: Displays the user identification applied to the rule. 4294967295 (0xFFFFFFFF) means no UID was applied and therefore it applies to everyone.
    • Action: Displays the action to be taken. The values can be accept or drop.
    • Interface IN name: Displays the input interface name. For example, wlan0.
    • Interface OUT name: Displays the output interface name. For example, wlan0.
    • State: Displays the connection state. The values are none, established, or related.
    • TCP Mask: Displays the array of TCP masks. The values are fin, syn, rst, psh, ack, and urg.
    • TCP Cmp: Displays the array of TCP flags. The values are urg, ack, psh, rst, syb, and fin.
    • TCP Inv: Boolean indicates that sense of the TCP flags should be inverted. The values are True or False.
    • Protocol: Displays the protocol of the firewall rule. The values are icmp, igmp, tcp, udp.
    • Source Port Range: Displays the port range from source that sends the traffic. The value can be between 0 and 65535.
    • Destination Port Range: Displays the port range on destination that receives the traffic. The value can be between 0 and 65535.
    • Packets: Displays the number of packets.
    • Bytes: Displays the number of bytes.

A brief summary of the flags is listed as follows:

  • URG: Urgent Pointer field significant
  • ACK: Acknowledgment field significant
  • PSH: Push Function
  • RST: Reset the connection
  • SYN: Synchronize sequence numbers
  • FIN: No more data from sender
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network list-firewall-rules
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 Ruleset     IsValid SourceIp     SourceMask      DestinationIp   DestinationMask UID        Action InterfaceInName TcpInv Protocol SourcePortRange DestinationPortRange Packets Bytes  TcpMask TcpCmp
 =====================================================================================================================================================================================================
 PREROUTING  False   None         None            None            None            None       None   None            None   None     None            None                 None    None   None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    <value>      <value>         <value>         <value>         <value>     accept                 False  any      0-65535         0-65535              0       0      None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    <value>      <value>         <value>         <value>         <value>     accept                 True   tcp      0-65535         0-65535              823     394754 syn,ack syn
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    192.168.35.1 <value>         <value>         <value>         <value>     accept azspheresvc     False  any      0-65535         0-65535              15      780    None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    <value>      <value>         <value>         <value>         <value>     accept                 False  udp      53-53           0-65535              0       0      None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    <value>      <value>         <value>         <value>         <value>     accept                 False  udp      53-53           0-65535              0       0      None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------
 INPUT       True    <value>      <value>         <value>         <value>         <value>     accept                 False  udp      53-53           0-65535              0       0      None    None
 ----------- ------- ------------ --------------- --------------- --------------- ---------- ------ --------------- ------ -------- --------------- -------------------- ------- ------ ------- ------

network list-interfaces

Lists the network interfaces for the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network list-interfaces
 ------------- ----------- ------------------ ---------- ------------- ------------------- ------------ -----------------
 InterfaceName InterfaceUp ConnectedToNetwork IpAcquired IpAddresses   ConnectedToInternet IpAssignment HardwareAddress
 ========================================================================================================================
 azspheresvc   True        False              False      <value>       False               None         None
 ------------- ----------- ------------------ ---------- ------------- ------------------- ------------ -----------------
 eth0          True        True               True       <value>       True                dynamic      <value>
 ------------- ----------- ------------------ ---------- ------------- ------------------- ------------ -----------------
 lo            True        False              False      <value>       False               None         None
 ------------- ----------- ------------------ ---------- ------------- ------------------- ------------ -----------------
 wlan0         True        True               True       <value>       True                dynamic      <value>
 ------------- ----------- ------------------ ---------- ------------- ------------------- ------------ -----------------

network proxy

Manages proxy address use for network connection. For more information on configuring an Azure Sphere device to connect to the Internet through a proxy server, see Connect through a proxy server.

Note

Only HTTP proxies are currently supported.

Operation Description
proxy apply Configures the network proxy on the attached device.
proxy delete Deletes the proxy connection on the attached device.
proxy show Shows proxy connection on the attached device.

proxy apply

Configures the network proxy on the attached device.

Note

This command is not available in Azure Sphere classic CLI.

Required parameters

Parameter Type Description Supported version
-a, --address String Specifies the network address of the proxy to be used. Azure Sphere CLI
-t, --authentication String Specifies the authentication type to use. Allowed values: anonymous or basic. If the proxy requires a user name and password, set this to basic, otherwise use anonymous. Azure Sphere CLI
-r, --port Integer Specifies the port on the network address to be used. The value must be equal to or less than 65535. Azure Sphere CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
--enable String Specifies whether the proxy should be enabled. You must set either --enable or --disable. Azure Sphere CLI
--disable String Specifies whether the proxy should be disabled. You must set either --enable or --disable. Azure Sphere CLI
-n, --no-proxy-addresses String Specifies an array of space-separated network addresses the device should avoid for proxy connection. Azure Sphere CLI
-p, --password String Specifies the password for proxy authentication Only used for basic authentication. Maximum length: 64 characters. Azure Sphere CLI
-u, --username String Specifies the username for proxy authentication. Only used for basic authentication. Maximum length: 64 characters. Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network proxy apply --address contoso.com --authentication anonymous --port 8080 --enable
 ----------- ------- ----- ------------------ ----------------
 Address     Enabled Port  AuthenticationType NoProxyAddresses
 =============================================================
 contoso.com True   8080  anonymous
 ----------- ------- ----- ------------------ ----------------

proxy delete

Deletes proxy connection on the attached device.

Note

This command is not available in Azure Sphere classic CLI.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network proxy delete

proxy show

Shows proxy connection on the attached device.

Note

This command is not available in Azure Sphere classic CLI.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network proxy show
 ----------- ------- ----- ------------------ ----------------
 Address     Enabled Port  AuthenticationType NoProxyAddresses
 =============================================================
 contoso.com True   8080  anonymous
 ----------- ------- ----- ------------------ ----------------

network show-diagnostics

Shows diagnostics for one or all Wi-Fi networks on the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-n, --network Integer Specifies the ID of the Wi-Fi network for which to show diagnostics. - Azure Sphere CLI
- Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network show-diagnostics
 ------------------------- --------- ----- ------------- --------------- --------
 Timestamp                 NetworkId Ssid  ConfigState   ConnectionState Error
 ================================================================================
 2021-06-16T20:51:29+00:00 0         <value> temp-disabled disconnected    WrongKey
 ------------------------- --------- ----- ------------- --------------- --------

network show-status

Shows the network status for the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network show-status
 --------------------------- --------------- -----
 DeviceAuthenticationIsReady NetworkTimeSync Proxy
 =================================================
 True                        complete        ready
 --------------------------- --------------- -----

network update-interface

Updates the Ethernet network interface for the device. For more information on setting the MAC address for the device, see Ethernet configuration.

Note

This command is supported for configuring Ethernet eth0 connections. An error will be reported if you configure lo, azspheresvc or wlan0.

Required parameters

Parameter Type Description Supported version
--hardware-address String Specifies the hardware address to set for the device in either of the following formats: AA:BB:33:DD:EE:FF or aa:bb:33:dd:ee:ff. Azure Sphere CLI
--interface
or
--interface-name [Deprecated]
String Specifies the name of the interface to configure. Run azsphere device network list-interfaces to view details of the network interfaces for the attached device. The --interface-name argument has been deprecated and will be removed in a future release. For more information, see Important changes (deprecations) in Azure Sphere CLI. Azure Sphere CLI
-ha, --hardwareaddress String Specifies the hardware address to set for the device in either of the following formats: AA:BB:33:DD:EE:FF or aa:bb:33:dd:ee:ff. Azure Sphere classic CLI
-n, --interfacename String Specifies the name of the interface to configure. Run azsphere device network list-interfaces to view details of the network interfaces for the attached device. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device network update-interface --interface eth0 --hardware-address ba:98:76:54:32:10

recover

Replaces the system software on the device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device to run the command on when multiple devices are attached. The currently attached device is used by default. Specify the ID, IP address, or Local Connection ID of the device. Azure Sphere CLI
-c, --capability String Specifies the device capability image to apply to the device during recovery. - Azure Sphere CLI
- Azure Sphere classic CLI
-i, --images String Specifies the path to a folder that contains the image packages to write to the device. By default, recovery uses the images in the SDK unless an alternate path is provided with this flag. - Azure Sphere CLI
- Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

Example 1:

azsphere device recover
Downloading recovery images...
Download complete.
Starting device recovery. Please note that this may take up to 10 minutes.
Board found. Sending recovery bootloader.
Erasing flash.
Sending 17 images. (5443272 bytes to send)
Sent 1 of 17 images. (5440896 of 5443272 bytes remaining)
Sent 2 of 17 images. (5414844 of 5443272 bytes remaining)
Sent 3 of 17 images. (5311892 of 5443272 bytes remaining)
Sent 4 of 17 images. (5311500 of 5443272 bytes remaining)
Sent 5 of 17 images. (5041520 of 5443272 bytes remaining)
Sent 6 of 17 images. (5024908 of 5443272 bytes remaining)
Sent 7 of 17 images. (4994856 of 5443272 bytes remaining)
Sent 8 of 17 images. (2397456 of 5443272 bytes remaining)
Sent 9 of 17 images. (885796 of 5443272 bytes remaining)
Sent 10 of 17 images. (861220 of 5443272 bytes remaining)
Sent 11 of 17 images. (758608 of 5443272 bytes remaining)
Sent 12 of 17 images. (135796 of 5443272 bytes remaining)
Sent 13 of 17 images. (70048 of 5443272 bytes remaining)
Sent 14 of 17 images. (41164 of 5443272 bytes remaining)
Sent 15 of 17 images. (32768 of 5443272 bytes remaining)
Sent 16 of 17 images. (16384 of 5443272 bytes remaining)
Sent 17 of 17 images. (0 of 5443272 bytes remaining)
Finished writing images; rebooting board.
Device ID: 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968
Device recovered successfully.

Example 2:

azsphere device recover --capability "C:\Users\capability file\capability_352FE1F_5.bin"
Downloading recovery images...
Download complete.
Starting device recovery. Please note that this may take up to 10 minutes.
Board found. Sending recovery bootloader.
Erasing flash.
Sending 16 images. (5474668 bytes to send)
Sent 1 of 16 images. (5447384 of 5474668 bytes remaining)
Sent 2 of 16 images. (5343788 of 5474668 bytes remaining)
Sent 3 of 16 images. (5343396 of 5474668 bytes remaining)
Sent 4 of 16 images. (5073416 of 5474668 bytes remaining)
Sent 5 of 16 images. (5056612 of 5474668 bytes remaining)
Sent 6 of 16 images. (5026240 of 5474668 bytes remaining)
Sent 7 of 16 images. (2479376 of 5474668 bytes remaining)
Sent 8 of 16 images. (889892 of 5474668 bytes remaining)
Sent 9 of 16 images. (865316 of 5474668 bytes remaining)
Sent 10 of 16 images. (754512 of 5474668 bytes remaining)
Sent 11 of 16 images. (135796 of 5474668 bytes remaining)
Sent 12 of 16 images. (70048 of 5474668 bytes remaining)
Sent 13 of 16 images. (41164 of 5474668 bytes remaining)
Sent 14 of 16 images. (32768 of 5474668 bytes remaining)
Sent 15 of 16 images. (16384 of 5474668 bytes remaining)
Sent 16 of 16 images. (0 of 5474668 bytes remaining)
Finished writing images; rebooting board.
Device ID: 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968
Device recovered successfully.

rescan-attached

Rescans the attached devices by power-cycling all their FTDI ports and displays the total count of attached devices. Use this command when troubleshooting device connection problems on Windows. This command runs only on Windows.

Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

 azsphere device rescan-attached
 -----------
 Count
 ===========
 2
 -----------

restart

Restarts the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device restart
Restarting device.
Device restarted successfully.

show

Displays details of an attached device in your Azure Sphere tenant.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-i, --deviceid GUID Specifies the ID of the device. Shows information about the currently attached device by default. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device show
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ -------- ------------------------------------ ------------------------------------
 DeviceId                                                                                                                         TenantId                             ChipSku  ProductId                            DeviceGroupId
 ========================================================================================================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968 a323c263-2aa3-2559-aabb-a3fc32631900 MT3620AN 6f52bead-700d-4289-bdc2-2f11f774270e 7f860cc1-4949-4000-a541-9a988ba4c3cd
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ -------- ------------------------------------ ------------------------------------

You can use the --query parameter to customize the output displayed for this command. For more information, see Query CLI command output.

The following example shows how to select just the Device ID and Product ID:

azsphere device show --device 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968  --query '{DeviceId:deviceId, ProductId:productId}'
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------
 DeviceId                                                                                                                         ProductId
 =====================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968 6f52bead-700d-4289-bdc2-2f11f774270e
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------

show-attached

Displays information about the attached device from the device itself. These details differ from those that the Azure Sphere Security Service stores for the device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device show-attached
Device ID: 352fe1f59e40ef8a9266415e81af32b5b07d8f2bbd6b5650cef4a70b86c7fcbc70b129a41fbc6d02f8bb4aaabc52cd5740c85427d205e46a166b7e41135eb968
IP address: 192.128.48.1
Connection path: 21143

show-deployment-status

Displays the deployment status of application and operating system updates for the device.

Use this command to find out which version of the Azure Sphere OS your device is running or whether the current deployment update has completed.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device show-deployment-status
Your device is running Azure Sphere OS version <version-number>.
The Azure Sphere Security Service is targeting this device with Azure Sphere OS version <version-number>.
Your device has the expected version of the Azure Sphere OS: <version-number>.

In this example, <version-number> represents the current operating system version.

show-count

Displays the number of devices in the current tenant.

Optional parameters

Parameter Type Description Supported version
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

 azsphere device show-count
 ------
 Result
 ======
 2
 ------

show-os-version

Displays the current operating system version on the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only)Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device show-os-version
Your device is running Azure Sphere OS version <version-number>

In this example, <version-number> represents the current operating system version.

sideload

Manages the application on the device.

Some sideload options require additional capabilities once the device is in the manufacturing state DeviceComplete. The fieldServicing capability allows you to deploy and delete temporary production-signed images and deploy permanent production-signed images. The appDevelopment capability allows you to deploy and delete both production-signed and SDK-signed images.

Operation Description
delete Deletes the current application from the device.
deploy Loads an application onto the device.
set-deployment-timeout Sets the deployment time-out period in seconds.
show-deployment-timeout Shows the deployment time-out period in seconds.

Note that the parameters to start, stop, show-status, and show-quota have been moved to the azsphere device app command.

sideload delete

Deletes applications from the device.

This command is available only if the appDevelopment device capability is configured.

Optional parameters

Parameter Type Description Supported version
-i, --component-id GUID Specifies the ID of the application to delete from the device. If omitted, deletes all applications. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-i, --componentid GUID Specifies the ID of the application to delete from the device. If omitted, deletes all applications. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device sideload delete
Component '54acba7c-7719-461a-89db-49c807e0fa4d' deleted.

sideload deploy

Loads an application onto the attached device and starts the application.

This command fails if the application manifest requests a resource that is being used by an application that is already on the device. In this case, use azsphere device sideload delete to delete the existing application and then try sideloading again. The azsphere device sideload delete command will delete both high level applications and real time applications; to delete one application and leave the other specify the component ID of the application to delete.

The same command is used to deploy both high-level applications and real-time capable applications.

Note

A device reboot is triggered when a new application that uses peripherals is installed and the following conditions are met:

If a device reboot is initiated, wait until the reboot is complete and the device becomes responsive.

Required parameters

Parameter Type Description Supported version
-p, --image-package String Specifies the path and filename of the image package to load on the device. Azure Sphere CLI
-p, --imagepackage String Specifies the path and filename of the image package to load on the device. Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-m, --manual-start Boolean Specifies not to automatically start the application after loading it. Azure Sphere CLI
--force Boolean Forces the deployment of an image that uses a Beta API that may no longer be supported. - Azure Sphere CLI
- Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-m, --manualstart Boolean Specifies not to automatically start the application after loading it. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device sideload deploy --image-package C:\Users\LocalSamples\HelloWorld\HelloWorld_HighLevelApp\out\ARM-Debug\HelloWorld_HighLevelApp.imagepackage
Deploying 'C:\Users\LocalSamples\HelloWorld\HelloWorld_HighLevelApp\out\ARM-Debug\HelloWorld_HighLevelApp.imagepackage' to the attached device.
Image package 'C:\Users\LocalSamples\HelloWorld\HelloWorld_HighLevelApp\out\ARM-Debug\HelloWorld_HighLevelApp.imagepackage' has been deployed to the attached device.

sideload set-deployment-timeout

Sets the deployment time-out value in seconds for sideloading images on the device.

Required parameters

Parameter Type Description Supported version
-v, --value Integer Specifies the duration in seconds before a sideload command times out. The value must be a positive integer. Azure Sphere CLI
<timeout-value> Integer Specifies the duration in seconds before a sideload command times out. The value must be a positive integer. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device sideload set-deployment-timeout --value 60
 ------------------
 Deployment timeout
 ==================
 60
 ------------------

sideload show-deployment-timeout

Displays the current deployment time-out value in seconds for sideloading images on the device.

Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device sideload show-deployment-timeout
 ------------------
 Deployment timeout
 ==================
 60
 ------------------

update

Moves the device into a different device group in your Azure Sphere tenant.

In addition to device groups you create in a product, five default device groups are added when a product is created:

  • Development: Accepts only system software updates. Does not accept application updates.
  • Field Test: Accepts all updates from the Azure Sphere Security Service.
  • Production: Accepts all updates from the Azure Sphere Security Service.
  • Production OS Evaluation: Accepts all updates from the Azure Sphere Security Service.
  • Field Test OS Evaluation: Accepts all updates from the Azure Sphere Security Service.

For more information on fundamental elements involved in deployment, see Deployment basics.

Optional parameters

Parameter Type Description Supported version
-g, --device-group GUID or name Specifies the device group in which to move the device. You can specify either the device group ID or the device group name. To use the device group name, you must provide both the product name and device group name in the <product-name/device-group-name> format. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command. This parameter is required when multiple devices are attached, or when no device is attached. The currently attached device is used by default. You can provide a device ID for an unattached device, or you can specify the IP address or Local Connection ID of an attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-t, --tenant GUID or name Specifies the tenant to perform this operation in. Overrides the default selected tenant. You can specify either the tenant ID or tenant name. Azure Sphere CLI
-dgi, --devicegroupid GUID Specifies the ID of the device group. Use either device group ID or a device group name and product name pair. Azure Sphere classic CLI
-dgn, --devicegroupname String Specifies the name of the device group. Use either device group ID or a device group name and product name pair. Azure Sphere classic CLI
-i, --deviceid GUID Specifies the ID of the device to move. Moves the currently attached device by default. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-pn, --productname String Specifies the name of the product. Use either device group ID or a device group name and product name pair. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device update --device-group AW100/Marketing
 ------------------------------------------------------------------------------------------------------ ------------------------------------ -------- ------------------------------------ ------------------------------------
 DeviceId                                                                                               TenantId                             ChipSku  ProductId                            DeviceGroupId
 ==============================================================================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85 a323c263-2aa3-2559-aabb-a3fc32631900 MT3620AN 6f52bead-700d-4289-bdc2-2f11f774270e 7f860cc1-4949-4000-a541-9a988ba4c3cd
 427D205E46A166B7E41135EB968
 ------------------------------------------------------------------------------------------------------ ------------------------------------ -------- ------------------------------------ ------------------------------------

You can use the --query parameter to customize the output displayed for this command. For more information, see Query CLI command output.

The following example shows how to select just the Device ID and Product ID:

azsphere device update --device-group AW100/Marketing  --query '{DeviceId:deviceId, ProductId:productId}'
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------
 DeviceId                                                                                                                         ProductId
 =====================================================================================================================================================================
 352FE1F59E40EF8A9266415E81AF32B5B07D8F2BBD6B5650CEF4A70B86C7FCBC70B129A41FBC6D02F8BB4AAABC52CD5740C85427D205E46A166B7E41135EB968 6f52bead-700d-4289-bdc2-2f11f774270e
 -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------

wifi

Manages Wi-Fi configurations for the attached device.

To use the device on a Wi-Fi network, you must add information about the network and enable the network on the device. Although you can input non-ASCII characters in SSIDs, azsphere does not display them properly.

If your application uses the Wi-Fi configuration API, you must also include the WifiConfig capability in the application's app_manifest.json file.

Operation Description
add Adds the details of a wireless network to the device.
disable Disables a wireless network on the device.
enable Enables a wireless network on the device.
forget Removes the details of a wireless network from the device.
list Lists the current Wi-Fi configuration for the device.
reload-config Reloads the device Wi-Fi configuration.
scan Scans for available networks.
show Displays details of a Wi-Fi configuration.
show-status Displays the status of the wireless interface.

wifi add

Adds details of a Wi-Fi network to the attached device.

A device can have multiple Wi-Fi connections. Although you can input non-ASCII characters in SSIDs, azsphere does not display them properly. You can include the --targeted-scan parameter to connect to hidden SSIDs. For more information see, Connect Azure Sphere to Wi-Fi.

Required parameters

Parameter Type Description Supported version
-s, --ssid String Specifies the SSID of the network. Network SSIDs are case-sensitive. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
--client-cert-id String [EAP-TLS] Specifies the identifier (up to 16 characters) that identifies the client certificate (containing both the public and private key). Required to set up an EAP-TLS network. Azure Sphere CLI
--client-id <user@domain> String [EAP-TLS] Specifies the ID recognized for authentication by the network's RADIUS server. Required for some EAP-TLS networks. Azure Sphere CLI
--config-name String Specifies a string (up to 16 characters) that specifies the name for the network configuration. Azure Sphere CLI
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
--root-ca-cert-id String [EAP-tLS] Specifies the identifier (up to 16 characters) that identifies the server's root CA certificate for EAP-TLS networks where the device authenticates the server. Azure Sphere CLI
--targeted-scan Boolean Attempts to connect to a network even when it is not broadcasting or is hidden by network congestion. Azure Sphere CLI
-p, --psk String Specifies the WPA/WPA2 key for the new network. Omit to add the SSID as an open network. If your key contains an ampersand (&), enclose the key in quotation marks. - Azure Sphere CLI
- Azure Sphere classic CLI
-cc, --clientcertid String [EAP-TLS] Specifies a indentifier (up to 16 characters) that identifies the client certificate (containing both the public and private key). Required to set up an EAP-TLS network. Azure Sphere classic CLI
-cid, --clientid <user@domain> String [EAP-TLS] Specifies the ID recognized for authentication by the network's RADIUS server. Required for some EAP-TLS networks. Azure Sphere classic CLI
-cn, --configname String Specifies a string (up to 16 characters) that specifies the name for the network configuration. Azure Sphere classic CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is required only when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-ca, --rootcacertid String [EAP-tLS] Specifies the indentifier (up to 16 characters) that identifies the server's root CA certificate for EAP-TLS networks where the device authenticates the server. Azure Sphere classic CLI
-t, --targeted-scan Boolean Attempts to connect to a network even when it is not broadcasting or is hidden by network congestion. Allowed values: false, true Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi add --ssid MyNetwork --psk MyPassword
Successfully added network:
 ----- -------- ------------------ --------------- ------------- ------------
 ID    SSID     ConfigurationState ConnectionState SecurityState TargetedScan
 ============================================================================
 1     MyNetwork enabled            unknown         psk           False
 ----- -------- ------------------ --------------- ------------- ------------

If the network SSID or key has embedded spaces or an ampersand, enclose the SSID or key in single quotes. If the SSID or key includes a quotation mark, use a backslash to escape the quotation mark. Backslashes do not have to be escaped if they are part of a value. For more information, see Quotation marks and escapes characters. For example:

azsphere device wifi add --ssid "New SSID" --psk "key \'value\' with quotes"

wifi disable

Disables a Wi-Fi network on the attached device.

Required parameters

Parameter Type Description Supported version
-i, --id Integer Specifies the ID of the network to disable. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi disable --id 0
Successfully disabled network:
----- -------- ------------------ --------------- ------------- ------------
ID    SSID     ConfigurationState ConnectionState SecurityState TargetedScan
============================================================================
0     MyNetwork disabled           disconnected    psk           False
----- -------- ------------------ --------------- ------------- ------------

wifi enable

Enables a Wi-Fi network on the attached device.

To change from one network to another if both are within range, disable the currently connected network before you enable the new network.

Required parameters

Parameter Type Description Supported version
-i, --id Integer Specifies the ID of the network to enable. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi enable --id 0
Successfully enabled network:
 ----- -------- ------------------ --------------- ------------- ------------
 ID    SSID     ConfigurationState ConnectionState SecurityState TargetedScan
 ============================================================================
 0     MyNetwork enabled            disconnected    psk           False
 ----- -------- ------------------ --------------- ------------- ------------

wifi forget

Removes details of a Wi-Fi network from the attached device.

Required parameters

Parameter Type Description Supported version
-i, --id Integer Specifies the ID of the network to delete. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi forget --id 0
Successfully forgotten network.

wifi list

Lists the current Wi-Fi configuration for the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi list
 ----- --------- ------------------ --------------- ------------- ------------
 ID    SSID      ConfigurationState ConnectionState SecurityState TargetedScan
 =============================================================================
 0     MyNetwork1 enabled            connected       psk           False
 ----- ---------  ------------------ --------------- ------------- ------------
 1     MyNetwork2 enabled            disconnected    psk           False
 ----- ---------  ------------------ --------------- ------------- ------------
 2     MyNetwork3 enabled            disconnected    eaptls        False
 ----- ---------  ------------------ --------------- ------------- ------------

wifi reload-config

Reloads the Wi-Fi network configuration on the attached device. Use this command after you add or remove a certificate (azsphere device certificate) to ensure that EAP-TLS networks use the most recent contents of the certificate store.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi reload-config
Wi-Fi configuration was successfully reloaded.

wifi scan

Scan for available Wi-Fi networks visible to the attached device. The command will return up to 64 Wi-Fi networks, but the number of Wi-Fi networks displayed may be limited by environmental factors such as the density of access points in range.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi scan
----------------- ------------- ----------------- ----------- ---------
SSID              SecurityState BSSID             SignalLevel Frequency
=======================================================================
MyNetwork0        psk           <value>           -66         2442
----------------- ------------- ----------------- ----------- ---------
MyNetwork1        psk           <value>           -75         2442
----------------- ------------- ----------------- ----------- ---------
MyNetwork2        psk           <value>           -86         2412
----------------- ------------- ----------------- ----------- ---------

wifi show

Shows details of a Wi-Fi network on the attached device.

Required parameters

Parameter Type Description Supported version
-i, --id Integer Specifies the ID of the network configuration to show. - Azure Sphere CLI
- Azure Sphere classic CLI

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere device wifi show --id 0
 ----- --------- ------------------ --------------- ------------- ------------
 ID    SSID      ConfigurationState ConnectionState SecurityState TargetedScan
 =============================================================================
 0     MyNetwork enabled            disconnected    psk           False
 ----- --------- ------------------ --------------- ------------- ------------

wifi show-status

Shows the status of the Wi-Fi interface on the attached device.

Optional parameters

Parameter Type Description Supported version
-d, --device String Specifies the device on which to run the command when multiple devices are attached. This parameter is required when multiple devices are attached. The currently attached device is used by default. You can specify the device ID, IP address, or Local Connection ID of the attached device.
Azure Sphere CLI supports multiple MT3620 devices on Windows, but you can connect only one device at a time on Linux. For this reason, this parameter is supported for Windows but not for Linux. An error is returned if you use this parameter with the command on Linux.
Azure Sphere CLI
-ip, --deviceip String (Multi-device, Windows only) Specifies the IP address of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
-l, --devicelocation String (Multi-device, Windows only) Specifies the FTDI location ID of the device to use for this operation. This is only required when multiple devices are attached. You can specify either a device IP address or device location. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

 azsphere device wifi show-status
 ----- ------------------ --------------- ------------- --------- ------- ------------- --------- ------------- -----------------
 SSID  ConfigurationState ConnectionState SecurityState Frequency Mode    KeyManagement WpaState  IpAddress     MacAddress
 ================================================================================================================================
<value> enabled            connected       psk           2412      station WPA2-PSK      COMPLETED <value>      <value>
 ----- ------------------ --------------- ------------- --------- ------- ------------- --------- ------------- -----------------