> ## Content Index
> Fetch the complete content index at: https://note.xdq.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# Powershell移除隐藏设备
- URL: https://note.xdq.me/powershellyi-chu-yin-cang-she-bei/
- Published: 2025-11-28T02:38:58.000Z
- Updated: 2026-08-19T01:09:06.000Z
- Author: xud6
- Tags: windows, powershell, #Import 2026-10-03 02:45

```
#获取所有隐藏设备
$unknown_devs = Get-PnpDevice | Where-Object{$_.Status -eq 'Unknown'}
#打印
$unknown_devs | Format-Table

#过滤想移除的设备
$removeDeviceFriendlyName="Insert Device Name Here"
$remove_devs = $unknown_devs | Where-Object{$_.FriendlyName -eq $removeDeviceFriendlyName}
#打印
#$remove_devs | Format-Table

#使用pnputil删除所有设备
ForEach($dev in $remove_devs){
#移除注释执行
#    pnputil /remove-device $dev.InstanceId
}

```