Is there a way to detect thru OS the number of internal USB controllers and what connector/port is assigned to what controller when more than one controller is available ?
1 Answer
Number of USB controllers:
powershell -Command "@(gwmi Win32_USBController).count"
Assigned devices per controller (again, powershell code), but without port numbers:
gwmi Win32_USBControllerDevice | % {
$parent = [wmi] $_.Antecedent
$child = [wmi] $_.Dependent
$parent.caption + '\' + $child.caption
} | sort
Thats pretty much all the information you can get from WMI USB classes.
If you need more detail, you can either use a graphical tool like USB Device Tree Viewer or develop your own by modifying the C++ source code from a sample program from Microsoft called usbview.