From a command shell (cmd.exe) Win10 the following call is correct:
.\devcon.exe disable "USB\VID_0547&PID_1002&REV_0000"
But if I do the same from powershell I get the result
No matching devices found.
The same with that:
$retDevice = Get-WmiObject Win32_PNPEntity | select PnpDeviceID | where {$_.pnpdeviceid -like "USB\VID_0547&*"}
$callparam = $(" disable" +" " + $retDevice.pnpdeviceid.ToString()) + """"
.\devcon.exe $callparam
If I look at the string with the following all seems correct.
$callparam | Out-Default
out -> disable USB\VID_0547&PID_1002\5&22AA7556&0&2"