Azure Cli 获取特定设备孪生

问题描述 投票:0回答:1

有人知道为什么我收到此表而不是带有 azure cli 的 IotHub 设备孪生吗?

$iothub_name = 'iot-eu-iot-sandbox96587.azure-devices.net'
$device_id = 'SimulatedDevice'
az iot hub device-twin show --hub-name $iothub_name --device-id $device_id

azure-cli azure-iot-hub
1个回答
0
投票
  • --output json
    添加到
    MSDOC
    中的 az iot hub device-twin show 命令会在
    Json
    中显示输出。
  • 该命令获取 IoTHub 的设备孪生。
  • 感谢@MatthijsvanderVeer 对默认显示的评论。
az iot hub device-twin show --hub-name $iothub_name --device-id $device_id --output json

输出: enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.