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.
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%"