The methods from this solution will use C APIs. So you would have to use PInvoke with C#.
The cleanest method would be using a device specific API library that provides a reset call. Such libraries are usually provided as part of an SDK. Check if such an SDK is provided for your device by searching the web or contacting the manufacturer. If so, check if it provides a reset function. Such APIs provide usually also a function to find present devices.
For the other methods you have first to identify the device or the USB hub to which it is connected. Note also that these require administrator priviliges.
For most of the other methods you have to use the Windows SetupAPI. The article
Hardware Helper Library for C#[
^] and the sources may be helpful.
The first task is to identify the device(s) using one of the SetupAPI enumeration functions. If you want to acces the device itself you can get the device GUID from the INF installation file. To enumerate the hubs use the
GUID_DEVINTERFACE_USB_HUB
.
Having enumerated the USB hubs, you can for each enumerate the childs (which may be also hubs) until you find your device. Then you can use the
CM_Disable_DevNode function | Microsoft Docs[
^] and
CM_Enable_DevNode function | Microsoft Docs[
^] to try getting the device into a proper state again. Note that this might not work with all devices and Windows versions.
Finally you can go low level and use the
LibUsbDotNet C# USB Library download | SourceForge.net[
^]. This allwos you to toggle (disable and enable again) the USB hubs and ports which results in the connected devices to be removed and inserted again.