exam questions

Exam AZ-220 All Questions

View all questions & answers for the AZ-220 exam

Exam AZ-220 topic 5 question 1 discussion

Actual exam question from Microsoft's AZ-220
Question #: 1
Topic #: 5
[All AZ-220 Questions]

You have 10 IoT devices that connect to an Azure IoT hub named Hub1.
From Azure Cloud Shell, you run az iot hub monitor-events --hub-name Hub1 and receive the following error message: "az iot hub: 'monitor-events' is not in the 'az iot hub' command group. See 'az iot hub --help'."
You need to ensure that you can run the command successfully.
What should you run first?

  • A. az iot hub monitor-feedback --hub-name Hub1
  • B. az iot hub generate-sas-token --hub-name Hub1
  • C. az iot hub configuration list --hub-name Hub1
  • D. az extension add -name azure-cli-iot-ext
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Execute az extension add --name azure-cli-iot-ext once and try again.
In order to read the telemetry from your hub by CLI, you have to enable IoT Extension with the following commands:
Add: az extension add --name azure-cli-iot-ext
Reference:
https://github.com/MicrosoftDocs/azure-docs/issues/20843

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
EyeeyeeyeeyeeyeeyeeyeeyeSPIDER
Highly Voted 4 years, 10 months ago
The azure-cli-iot-ext is deprecated so I expect it'll be culled soon and this question retired. For those of our who get a question similar in the future I expect the answer to be az extension add --name azure-iot The legacy IoT extension Id azure-cli-iot-ext is deprecated in favor of the new modern Id azure-iot. azure-iot is a superset of azure-cli-iot-ext and any new features or fixes will apply to azure-iot only. Also the legacy and modern IoT extension should never co-exist in the same CLI environment.
upvoted 15 times
...
chrishao
Most Recent 3 years, 6 months ago
answer is correct.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...