Windows IoT Documentation – Services Overview
Welcome to the Windows IoT Services documentation hub. This page provides a comprehensive guide to the services available on Windows IoT Core and Enterprise, including how to configure, deploy, and monitor them.
Available Services
- DevicePortal – Remote management portal for IoT devices.
- IoT Edge – Deploy containerized workloads at the edge.
- Azure IoT Hub Integration – Secure device-to-cloud connectivity.
- Background Services – Long‑running tasks implemented as Windows Services.
- Device Management Service – Provisioning and lifecycle management.
Getting Started
To begin using services on a Windows IoT device, follow the steps below:
# Enable a service (example: DevicePortal)
dism /online /enable-feature /featurename:DevicePortal
# Verify the service status
sc query DevicePortald
Sample Code: Starting a Custom Service
Below is a minimal C# template for creating a background service on Windows IoT:
using System;
using System.ServiceProcess;
public class MyIoTService : ServiceBase
{
public MyIoTService()
{
ServiceName = "MyIoTService";
}
protected override void OnStart(string[] args)
{
// TODO: Add startup code here
System.Diagnostics.EventLog.WriteEntry(ServiceName, "Service started.");
}
protected override void OnStop()
{
// TODO: Add cleanup code here
System.Diagnostics.EventLog.WriteEntry(ServiceName, "Service stopped.");
}
public static void Main()
{
ServiceBase.Run(new MyIoTService());
}
}
Compile the code using dotnet publish and install it with sc create on the device.
DevicePortalSSLPortregistry key to 443 and enable the certificate.