这个情况,我在公司因为有很多机顶盒以及各类智能电视,那进入蓝牙和其他设备的页面后,刷百十来个轻轻松松。
这种同名的投影设备怎么处理呢?
PowerShell使用以下指令即可按通配符删出:
Get-PnpDevice | Where-Object -FilterScript{$_.FriendlyName -eq "我的鲜时光"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
参考上面的指令,照猫画虎,我最终得到了自己要用到一波指令:
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*客厅*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*魔百*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*投屏*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*Box*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*DLNA*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*的*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*酷*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*电视*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*盒子*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*彩云*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*CMCC*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*Mebox*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*和家*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*乐投*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*时光*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*Living*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*TV*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*NB0*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
参考资料
如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。
如本文对您有用,捐赠和留言 将是对我最好的支持~(捐赠可转为站内积分)
如愿意,请向朋友推荐本站,谢谢。
尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。
留言