Hello,
I have the following script that is not working. I'm trying to find some hardware id for some GPUs. I can find the hardware id but I can't manage to compare it with a predefined list
This is the output for the variable $hwidNo
\\WIN-TIP0J3116EV\root\cimv2:Win32_PnPEntity.DeviceID="PCI\\VEN_1002&DEV_683D&SUBSYS_25561458&REV_00\\4&BFF9516&0&0010"
Can anyone guide me to the right direction?
Thank you.
$hwid_intel = (
"8086&DEV_041A",
"1002&DEV_683D"
)
$hwid = Get-WmiObject Win32_PNPEntity | Where-Object {$_.ClassGuid –Match “{4d36e968-e325-11ce-bfc1-08002be10318}”}
$hwidNo = $hwid.DeviceID
if ($hwid_intel -like $hwidno) {write-host "true"}
write-host "3 - $hwid"
write-host "3 - $hwidno"
write-host "4 - $hwid_intel"