This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Bias Types:
⚠️ windows_first
⚠️ powershell_heavy
⚠️ windows_tools
⚠️ missing_linux_example
Summary:
The documentation is heavily focused on Windows, specifically on deploying Azure IoT Edge for Linux on Windows (EFLOW). All installation and configuration steps are provided exclusively for Windows using PowerShell commands and Windows-specific tools (e.g., Hyper-V, MSI installers). There are no equivalent instructions or examples for setting up IoT Edge on native Linux devices, nor are Linux command-line alternatives provided for installation or configuration. Linux commands only appear for module management after the Windows-based EFLOW VM is running.
Recommendations:
  • Add a parallel quickstart or clearly linked section for native Linux devices, including prerequisites, installation, and configuration steps using Linux commands (e.g., apt, yum, systemctl).
  • Provide Linux shell (bash) command equivalents alongside PowerShell commands where possible, especially for steps like downloading and installing the IoT Edge runtime.
  • Mention Linux-native virtualization/containerization requirements (e.g., Docker, containerd) and how to prepare a Linux host for IoT Edge.
  • Balance the order of presentation: if both Windows and Linux are supported, present both options equally or provide a clear choice at the start.
  • Explicitly state that this quickstart is for Windows hosts only, and link prominently to Linux-native instructions if available.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-22 00:01 #88 completed ✅ Clean
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ✅ Clean
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

If you get an error because you already have one free hub in your subscription, change the SKU to `S1`. If you get an error that the IoT hub name isn't available, someone else already has a hub with that name. Try a new name. ## Register an IoT Edge device Register an IoT Edge device with your newly created IoT hub. :::image type="content" source="./media/quickstart/register-device.png" alt-text="Diagram that shows the step to register a device with an I o T hub identity."::: Create a device identity for your simulated device so that it can communicate with your IoT hub. The device identity lives in the cloud, and you use a unique device connection string to associate a physical device to a device identity. IoT Edge devices behave and can be managed differently than typical IoT devices. Use the `--edge-enabled` flag to declare that this identity is for an IoT Edge device. 1. In Azure Cloud Shell, enter the following command to create a device named **myEdgeDevice** in your hub.
1. In an elevated PowerShell session, run each of the following commands to download IoT Edge for Linux on Windows. * **X64/AMD64**
Make sure your IoT Edge device meets the following requirements: * System Requirements * Windows 10<sup>1</sup>/11 (Pro, Enterprise, IoT Enterprise) <sub><sup>1</sup> Windows 10 minimum build 17763 with all current cumulative updates installed.</sub> * Hardware requirements * Minimum Free Memory: 1 GB * Minimum Free Disk Space: 10 GB ## Create an IoT hub Start by creating an IoT hub with the Azure CLI. :::image type="content" source="./media/quickstart/create-iot-hub.png" alt-text="Diagram that shows the step to create an I o T hub."::: The free level of Azure IoT Hub works for this quickstart. If you've used IoT Hub in the past and already have a hub created, you can use that IoT hub. The following code creates a free **F1** hub in the resource group `IoTEdgeResources`. Replace `{hub_name}` with a unique name for your IoT hub. It might take a few minutes to create an IoT hub.
1. Copy the value of the `connectionString` key from the JSON output and save it. This value is the device connection string. You'll use it to configure the IoT Edge runtime in the next section. For example, your connection string should look similar to `HostName=contoso-hub.azure-devices.net;DeviceId=myEdgeDevice;SharedAccessKey=<DEVICE_SHARED_ACCESS_KEY>`. ## Install and start the IoT Edge runtime Install IoT Edge for Linux on Windows on your device, and configure it with the device connection string. :::image type="content" source="./media/quickstart/start-runtime.png" alt-text="Diagram that shows the step to start the I o T Edge runtime."::: Run the following PowerShell commands on the target device where you want to deploy Azure IoT Edge for Linux on Windows. To deploy to a remote target device using PowerShell, use [Remote PowerShell](/powershell/module/microsoft.powershell.core/about/about_remote) to establish a connection to a remote device and run these commands remotely on that device. 1. In an elevated PowerShell session, run the following command to enable Hyper-V. For more information, check [Hyper-V on Windows 10](/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v).
1. Install IoT Edge for Linux on Windows on your device.
1. Set the execution policy on the target device to `AllSigned` if it is not already. You can check the current execution policy in an elevated PowerShell prompt using:
If the execution policy of `local machine` is not `AllSigned`, you can set the execution policy using:
1. Create the IoT Edge for Linux on Windows deployment.
1. Enter 'Y' to accept the license terms. 1. Enter 'O' or 'R' to toggle **Optional diagnostic data** on or off, depending on your preference. A successful deployment is pictured below. :::image type="content" source="./media/quickstart/successful-powershell-deployment.png" alt-text="Screenshot that show that a successful deployment will say Deployment successful at the end of the messages in the console." lightbox="./media/quickstart/successful-powershell-deployment.png"::: 1. Provision your device using the device connection string that you retrieved in the previous section. Replace the placeholder text with your own value.
Your IoT Edge device is now configured. It's ready to run cloud-deployed modules. ## Deploy a module Manage your Azure IoT Edge device from the cloud to deploy a module that sends telemetry data to IoT Hub. :::image type="content" source="./media/quickstart/deploy-module.png" alt-text="Diagram that shows the step to deploy a module."::: One of the key capabilities of Azure IoT Edge is deploying code to your IoT Edge devices from the cloud. *IoT Edge modules* are executable packages implemented as containers. In this section, you'll deploy a pre-built module from the [IoT Edge Modules section of Microsoft Artifact Registry](https://mcr.microsoft.com/catalog?cat=IoT%20Edge%20Modules&alphaSort=asc&alphaSortKey=Name). The module that you deploy in this section simulates a sensor and sends generated data. This module is a useful piece of code when you're getting started with IoT Edge because you can use the simulated data for development and testing. If you want to see exactly what this module does, you can view the [simulated temperature sensor source code](https://github.com/Azure/iotedge/blob/main/edge-modules/SimulatedTemperatureSensor/src/Program.cs). Follow these steps to deploy your first module. 1. Sign in to the [Azure portal](https://portal.azure.com) and go to your IoT Hub. 1. From the menu on the left, select **Devices** under the **Device management** menu. 1. Select the device ID of the target device from the list of devices. >[!NOTE] >When you create a new IoT Edge device, it will display the status code `417 -- The device's deployment configuration is not set` in the Azure portal. This status is normal, and means that the device is ready to receive a module deployment. 1. On the upper bar, select **Set Modules**. Choose which modules you want to run on your device. You can choose from modules that you've already created, modules from Microsoft Artifact Registry, or modules that you've built yourself. In this quickstart, you'll deploy a module from the Microsoft Artifact Registry. 1. In the **IoT Edge modules** section, select **Add** then choose **IoT Edge Module**. 1. Update the following module settings: | Setting | Value | |--------------------|----------------------------------------------------------------------| | IoT Module name | `SimulatedTemperatureSensor` | | Image URI | `mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:latest` | | Restart policy | always | | Desired status | running | 1. Select **Next: Routes** to continue to configure routes. 1. Add a route that sends all messages from the simulated temperature module to IoT Hub. | Setting | Value | |----------------------------------|--------------------------------------------| | Name | `SimulatedTemperatureSensorToIoTHub` | | Value | `FROM /messages/modules/SimulatedTemperatureSensor/* INTO $upstream` | 1. Select **Next: Review + create**. 1. Review the JSON file, and then select **Create**. The JSON file defines all of the modules that you deploy to your IoT Edge device. > [!NOTE] > When you submit a new deployment to an IoT Edge device, nothing is pushed to your device. Instead, the device queries IoT Hub regularly for any new instructions. If the device finds an updated deployment manifest, it uses the information about the new deployment to pull the module images from the cloud then starts running the modules locally. This process can take a few minutes. After you create the module deployment details, the wizard returns you to the device details page. View the deployment status on the **Modules** tab. You should see three modules: **$edgeAgent**, **$edgeHub**, and **SimulatedTemperatureSensor**. If one or more of the modules has **Yes** under **Specified in Deployment** but not under **Reported by Device**, your IoT Edge device is still starting them. Wait a few minutes, and then refresh the page. :::image type="content" source="./media/quickstart/view-deployed-modules.png" alt-text="Screenshot that shows the SimulatedTemperatureSensor in the list of deployed modules." lightbox="./media/quickstart/view-deployed-modules.png"::: If you have issues deploying modules, see [Troubleshoot IoT Edge devices from the Azure portal](troubleshoot-in-portal.md). ## View the generated data In this quickstart, you created a new IoT Edge device and installed the IoT Edge runtime on it. Then you used the Azure portal to deploy an IoT Edge module to run on the device without having to make changes to the device itself. The module that you pushed generates sample environment data that you can use for testing later. The simulated sensor is monitoring both a machine and the environment around the machine. For example, this sensor might be in a server room, on a factory floor, or on a wind turbine. The messages that it sends include ambient temperature and humidity, machine temperature and pressure, and a timestamp. IoT Edge tutorials use the data created by this module as test data for analytics. 1. Log in to your IoT Edge for Linux on Windows virtual machine using the following command in your PowerShell session:
:::image type="content" source="./media/quickstart/temperature-sensor-screen.png" alt-text="Screenshot that shows the output logs of the Simulated Temperature Sensor module when it's running." lightbox="./media/quickstart/temperature-sensor-screen.png"::: >[!TIP] >IoT Edge commands are case-sensitive when they refer to module names. ## Clean up resources If you want to continue on to the IoT Edge tutorials, skip this step. You can use the device that you registered and set up in this quickstart. Otherwise, you can delete the Azure resources that you created to avoid charges. If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. If you don't want to delete the whole group, you can delete individual resources instead. > [!IMPORTANT] > Check the contents of the resource group to make sure that there's nothing you want to keep. Deleting a resource group is irreversible. Use the following command to remove the **IoTEdgeResources** group. Deletion might take a few minutes.