我在 Powershell 上苦苦掙扎,在深入互聯網后我找不到我的答案。在 Powershell 中,如何獲取設備 ID 中具有類似子字串的設備串列?
偽代碼應該是這樣的
Get-PnpDevie if(InstanceId includes (USB\234FA))
uj5u.com熱心網友回復:
使用Where-ObjectcmdletGet-PnpDevice根據InstanceId屬性過濾輸出:
Get-PnpDevice |Where-Object InstanceId -like '*USB\234FA*'
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/338525.html
標籤:电源外壳
上一篇:將字串轉換為時間跨度
