Get list of connected USB devices in C# 29-12-2015 12:47:06 C# / Windows Form 0 Bookmark(s) 196 View(s) private static IEnumerable GetUsbDevices() { using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_PnPEntity")) { using (var collection = searcher.Get()) { foreach (var device in collection) { yield return new UsbDeviceInfo { DeviceId = device.GetPropertyValue("DeviceID").ToString(), Description = device.GetPropertyValue("Description").ToString() }; } } } } public class UsbDeviceInfo { public string DeviceId { get; set; } public string Description { get; set; } }