Using the Azure CLI to manage Azure Digital Twins
It is also possible to manage Azure Digital Twins instances using Windows PowerShell. We will require the azure-iot
extension, which contains all the cmdlets. While the extension is automatically installed when running command lets, we will install the extension by ourselves.
Open a Windows PowerShell and use the az login
command to log in with your credentials. Use the following command to install the extension:
az extension add --upgrade --name azure-iot
The extension is updated if it already exists. Just like the REST API, we have control plane and data plane command lets. An extensive list of all available command lets can be found here:
https://docs.microsoft.com/en-us/cli/azure/dt?view=azure-cli-latest&preserve-view=true#az_dt_list.
Let's start with an example of the control plane. Run the following command let:
az dt list --output table
This command let will generate a list of all available Azure...