Welcome to the community discussion on deploying Azure IoT Edge modules on Windows 10 IoT Core devices. Below you will find a step‑by‑step guide, sample scripts, and best practices.
Prerequisites
- Windows 10 IoT Core (RS5 or later)
- Azure subscription with IoT Hub provisioned
- Device credential (connection string)
- PowerShell 5.1+ or Azure CLI
Installation Steps
# Install the IoT Edge runtime
Install-Module -Name AzureIoTEdge -Repository PSGallery -Force
# Register the device with IoT Hub
$connectionString = "HostName=your-iothub.azure-devices.net;DeviceId=yourDevice;SharedAccessKey=..."
Set-IoTEdgeDevice -ConnectionString $connectionString
# Verify the service is running
Get-Service -Name iotedged
Deploy a Sample Module
Use the following JSON manifest to deploy the edgeAgent and a custom helloWorld module.
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {
"helloWorld": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-samples/helloworld:latest",
"createOptions": {}
},
"type": "docker",
"status": "running",
"restartPolicy": "always"
}
}
}
}
}
}
Verification
After deployment, monitor the module status via the Azure portal or using the CLI:
az iot hub monitor-events --hub-name YourIoTHub --device-id yourDevice --output table
Comments