【笔记备用】一条powershell命令 批量删除Win10蓝牙和其他设备

原出处:一条powershell命令 批量删除Win10蓝牙和其他设备 - 简书 (jianshu.com)

Get-PnpDevice | Where-Object {$_.FriendlyName -like "*想删除的设备名*"}|ForEach-Object{pnputil.exe /remove-device $_.InstanceId }
tips:
1. 此处Where-Object {$_.FriendlyName -like "*想删除的设备名*"},此处支持通配符,我的电脑上是一堆不知道什么玩意的设备,那就以VIDAA-45-LYNN*作为通配符
2. pnputil.exe删除设备需要Administrator权限,所以需要在powershell上右键选择“以管理员身份运行”
链接:https://www.jianshu.com/p/a105e4af8842
来源:简书
win11亲测有效,诸如一堆“我的鲜时光”之类的可以使用该命令删除
记得关网络共享和流媒体传输