(“Select * From Win32_USBControllerDevice”) Set colDevices = objWMIService.ExecQuery _ Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”) That’s ok for now the point is that this class points to 2 other WMI entities.īelow is the VBScript that I got from here. The first thing you need to understand is that the WMI class WIN32_USBControllerDevice describes the connection between USB controllers (The Antecedent) and their logical devices (the Dependent). I rewrote it in PowerShell and was pretty happy with the results so I thought I would share them. Over on, I came upon a VBScript in a forum to find all the PNP entities associated with a USBController.