Donotalo
Donotalo

Reputation: 13035

WQL with string finding in where clause

I'm looking a way to search for USB devices where the DeviceID contains the string literal VID_217C. Is it possible?

In other words, I'm looking for the following query

select * from Win32_USBHub where DeviceID contains "VID_217C"

to return only those Win32_USBHubs for which VID_217C is a substring in DeviceID.

Upvotes: 2

Views: 950

Answers (1)

Damith
Damith

Reputation: 63105

You can use like operator

select * from Win32_USBHub where DeviceID LIKE "%VID_217C%"

Upvotes: 1

Related Questions