exam questions

Exam AZ-202 All Questions

View all questions & answers for the AZ-202 exam

Exam AZ-202 topic 6 question 1 discussion

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

DRAG DROP -
You develop an IoT solution by using Node.js. The solution is ready to deploy to the production environment.
You must implement the device twin capabilities of Azure IoT Hub. You must register a sensor named Sensor00. The IoT Hub name is Hub01.
You need to register the endpoint with ContosoHub01 so that you can configure them from your solution.
Which four commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: az extension add --name azure-cli-iot-ext
Run the following command in the command-line environment where you are using the Azure CLI to install the IoT extension: az extension add --name azure-cli-iot-ext
Step 2: az iot hub device-identity create
--hub-name {Hub01}
--device-id Sensor00
Create a new device identity called myDeviceId and retrieve the device connection string with these commands: az iot hub device-identity create --device-id myDeviceId --hub-name {Your IoT Hub name} az iot hub device-identity show-connection-string --device-id myDeviceId --hub-name {Your IoT Hub name} -o table
Step 3: az iot hub device-identity show-connection-string
--hub-name {Hub01}
--device-id Sensor00
--output table
Step 4:

Create the service app -
In this section, you create a Node.js console app that adds location metadata to the device twin. npm install azure-iothub --save
References:
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-node-node-twin-getstarted

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
fmonsua
5 years ago
Step 3 in the answer blocks diagram doesn't match with the explanation.
upvoted 1 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 ...