Azure IoT Edge configuration tool (the Tool) is a command-line tool that installs IoT Edge runtime version 1.2 and configures Azure IoT Edge on a device. The tool greatly simplifies the configuration of IoT Edge by automating several steps into single command.
The tool is useful to install and configure IoT Edge on any given device (physical or virtual) to get started with just one command. The tool is also useful by OT persona in production who are required to perform the task and can eliminate the skill gaps.
* Physical device or virtual machine. You must setup by yourself as the tool neither installs OS nor creates VM
* Your physical device or VM must be running [Tier1 OS supported by IoT Edge](https://docs.microsoft.com/en-us/azure/iot-edge/support?view=iotedge-2020-11#linux-containers)
* IoT Edge config tool supports DPS based provisioning using SAS Key only. You must manually create IoT Hub instance that links to DPS scope and/or create IoT Central manually.
### Test with Azure IoT Hub
1. Use existing IoT Hub & DPS or create a new Hub
* Create [IoT Hub](https://ms.portal.azure.com/#create/Microsoft.IotHub) and create [DPS](https://ms.portal.azure.com/#create/Microsoft.IoTDeviceProvisioning)
* Link IoT Hub to the [DPS scope](https://docs.microsoft.com/en-us/azure/iot-dps/quick-setup-auto-provision)
2. Go to DPS resource and create [individual enrollment](https://docs.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-symm-key#create-a-device-enrollment-entry-in-the-portal).
* Go to DPS - Manage enrollments - Add individual enrollment
* Make sure to use Symmetric Key for attestation type and IoT Edge device== true is selected (default is false)
* Retrieve the following information from the DPS resource page
* 'Registration ID' (Recommendation: Use the same ID as Device ID for Hub)
* ID Scope available in [Overview menu](https://docs.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-symm-key#run-the-provisioning-code-for-the-device)
* Primary SAS Key from individual enrollment menu
3. On a device or VM, run the command below. Copy and pastevalues from above into the script arguments below.
Upon completion of the script, go to IoT Hub - IoT Edge page and check the device is created and check system modules ($edgeAgent and $edgeHub) are created. Note that $edgeHub module will only get deployed when the first custom edge module is deployed.
### Test with Azure IoT Central
1. Create a newIoT Central App; Go to [IoT Central](https://apps.azureiotcentral.com/) and click <+ Build> button. Select any app template or create custom app.
2. Create a new device by clicking <+ New> button
3. In 'All devices' view, click on the created devie and click Connect button. Dialoge with ID Scope, Device ID and Primary key will be displayed. Make sure to use authentication type = Shared access signature (SAS)
4. On a device or VM, run the command below. Copy and pastevalues from above dialog into the script arguments below.