2

Does anybody know the way to get devices attached to PCI Express slots by using WMI?

I've been using Win32_PnPEntity class, but I can't make a distinguish between PCI and PCI Express devices.

d3rzKy
  • 142
  • 2
  • 9

1 Answers1

3

AFAIK there is not a WMI class or property to detect the PCI Express devices directly in a reliable way, but as workaround you can check for the PCI Express string in the Description property of the Win32_PnPEntity WMI class.

SELECT * FROM Win32_PnPEntity Where Description LIKE "%PCI Express%"
RRUZ
  • 134,889
  • 20
  • 356
  • 483