You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/concepts-cli.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Digital Twins
4
4
description: Learn about the Azure Digital Twins CLI command set.
5
5
author: baanders
6
6
ms.author: baanders
7
-
ms.date: 03/31/2022
7
+
ms.date: 04/09/2025
8
8
ms.topic: conceptual
9
9
ms.service: azure-digital-twins
10
10
---
@@ -38,18 +38,18 @@ The Azure Digital Twins commands are part of the [Azure IoT extension for Azure
38
38
39
39
### CLI version requirements
40
40
41
-
If you're using the Azure CLI with PowerShell, your Azure CLI version should be 2.3.1 or above as a requirement of the extension package.
41
+
If you're using the Azure CLI with PowerShell, your Azure CLI version should be 2.3.1 or greater as a requirement of the extension package.
42
42
43
43
You can check the version of your Azure CLI with this CLI command:
44
44
```azurecli
45
45
az --version
46
46
```
47
47
48
-
For instructions on how to install or update the Azure CLI to a newer version, see [Install the Azure CLI](/cli/azure/install-azure-cli).
48
+
For instructions on how to install or update the Azure CLI to a newer version, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
49
49
50
50
### Get the extension
51
51
52
-
The Azure CLI will automatically prompt you to install the extension on the first use of a command that requires it.
52
+
The Azure CLI automatically prompts you to install the extension on the first use of a command that requires it.
53
53
54
54
Otherwise, you can use the following command to install the extension yourself at any time (or update it if it turns out that you already have an older version). The command can be run in either the [Azure Cloud Shell](../cloud-shell/overview.md) or a [local Azure CLI](/cli/azure/install-azure-cli).
55
55
@@ -59,7 +59,7 @@ az extension add --upgrade --name azure-iot
59
59
60
60
## Use special characters in different shells
61
61
62
-
Some `az dt` commands use special characters that may have to be escaped for proper parsing in certain shell environments. Use the tips in this section to help you know when to do this in your shell of choice.
62
+
Some `az dt` commands use special characters that might have to be escaped for proper parsing in certain shell environments. Use the tips in this section to help you know when to escape special characters in your shell of choice.
63
63
64
64
### Bash
65
65
@@ -69,7 +69,7 @@ Use these special character tips for Bash environments.
69
69
70
70
In many twin queries, the `$` character is used to reference the `$dtId` property of a twin. When using the [az dt twin query](/cli/azure/dt/twin#az-dt-twin-query) command to query in the Cloud Shell Bash environment, escape the `$` character with a backslash (`\`).
71
71
72
-
Here is an example of querying for a twin with a CLI command in the Cloud Shell Bash environment:
72
+
Here's an example of querying for a twin with a CLI command in the Cloud Shell Bash environment:
73
73
74
74
```azurecli
75
75
az dt twin query --dt-name <instance-hostname-or-name> --query-command "SELECT * FROM DigitalTwins T Where T.\$dtId = 'room0'"
@@ -83,7 +83,7 @@ Use these special character tips for PowerShell environments.
83
83
84
84
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in the PowerShell environment, escape double quote characters (`"`) inside the JSON with a backslash (`\`).
85
85
86
-
Here is an example of creating a twin with a CLI command in PowerShell:
86
+
Here's an example of creating a twin with a CLI command in PowerShell:
In many twin queries, the `$` character is used to reference the `$dtId` property of a twin. When using the [az dt twin query](/cli/azure/dt/twin#az-dt-twin-query) command to query in a PowerShell environment, escape the `$` character with a backtick character.
98
98
99
-
Here is an example of querying for a twin with a CLI command in PowerShell:
99
+
Here's an example of querying for a twin with a CLI command in PowerShell:
100
+
100
101
```azurecli
101
102
az dt twin query --dt-name <instance-hostname-or-name> --query-command "SELECT * FROM DigitalTwins T Where T.`$dtId = 'room0'"
102
103
```
@@ -109,7 +110,7 @@ Use these special character tips for the local Windows CMD.
109
110
110
111
Some commands, like [az dt twin create](/cli/azure/dt/twin#az-dt-twin-create), allow you to enter twin information in the form of inline JSON. When entering inline JSON in a local Windows CMD window, enclose the parameter value with double quotes (`"`) instead of single quotes (`'`), and escape double quote characters inside the JSON with a backslash (`\`).
111
112
112
-
Here is an example of creating a twin with a CLI command in the local Windows CMD:
113
+
Here's an example of creating a twin with a CLI command in the local Windows CMD:
0 commit comments