Returns information about all the USB controllers found on a computer.

JavaScript
Edit|Remove
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20;

   var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");
   var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_USBController", "WQL",
                                          wbemFlagReturnImmediately | wbemFlagForwardOnly);

   var enumItems = new Enumerator(colItems);
   for (; !enumItems.atEnd(); enumItems.moveNext()) {
      var objItem = enumItems.item();

      WScript.Echo("Availability: " + objItem.Availability);
      WScript.Echo("Caption: " + objItem.Caption);
      WScript.Echo("Config Manager Error Code: " + objItem.ConfigManagerErrorCode);
      WScript.Echo("Config Manager User Config: " + objItem.ConfigManagerUserConfig);
      WScript.Echo("Creation Class Name: " + objItem.CreationClassName);
      WScript.Echo("Description: " + objItem.Description);
      WScript.Echo("Device ID: " + objItem.DeviceID);
      WScript.Echo("Error Cleared: " + objItem.ErrorCleared);
      WScript.Echo("Error Description: " + objItem.ErrorDescription);
      WScript.Echo("Install Date: " + objItem.InstallDate);
      WScript.Echo("Last Error Code: " + objItem.LastErrorCode);
      WScript.Echo("Manufacturer: " + objItem.Manufacturer);
      WScript.Echo("Max Number Controlled: " + objItem.MaxNumberControlled);
      WScript.Echo("Name: " + objItem.Name);
      WScript.Echo("PNP Device ID: " + objItem.PNPDeviceID);
      try { WScript.Echo("Power Management Capabilities: " + 
         (objItem.PowerManagementCapabilities.toArray()).join(",")); }
         catch(e) { WScript.Echo("Power Management Capabilities: null"); }
      WScript.Echo("Power Management Supported: " + objItem.PowerManagementSupported);
      WScript.Echo("Protocol Supported: " + objItem.ProtocolSupported);
      WScript.Echo("Status: " + objItem.Status);
      WScript.Echo("Status Info: " + objItem.StatusInfo);
      WScript.Echo("System Creation Class Name: " + objItem.SystemCreationClassName);
      WScript.Echo("System Name: " + objItem.SystemName);
      WScript.Echo("Time Of Last Reset: " + objItem.TimeOfLastReset);
      WScript.Echo();
   }