Skip to content

Commit 93e37c1

Browse files
Merge pull request #219983 from timlt/cli-telemetry
update for powershell command
2 parents 44f8c96 + 36baebc commit 93e37c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

articles/iot-hub/quickstart-send-telemetry-cli.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,17 @@ In this section, you update the state of the simulated device by setting propert
176176
177177
1. In the second CLI session, run the [az iot hub device-twin update](/cli/azure/iot/hub/device-twin#az-iot-hub-device-twin-update) command. This command updates the properties to the desired state on the IoT hub device twin that corresponds to your simulated device. In this case, the command sets example temperature condition properties.
178178
179+
> [!IMPORTANT]
180+
> If you're using PowerShell in the CLI shell, use the PowerShell version of the command below. PowerShell requires you to escape the characters in the JSON payload.
181+
179182
*YourIotHubName*. Replace this placeholder below with the name you chose for your IoT hub.
180183
181184
```azurecli
182185
az iot hub device-twin update -d simDevice --desired '{"conditions":{"temperature":{"warning":98, "critical":107}}}' -n {YourIoTHubName}
183186
```
187+
```azurepowershell
188+
az iot hub device-twin update -d simDevice --desired '{\"conditions\":{\"temperature\":{\"warning\":98, \"critical\":107}}}' -n {YourIoTHubName}
189+
```
184190
185191
1. In the first CLI session, confirm that the simulated device outputs the property update.
186192

0 commit comments

Comments
 (0)