블루투스 장치를 제거할 수 없습니다

블루투스 장치를 제거할 수 없습니다

컴퓨터에서 Bluetooth 장치를 제거할 수 없습니다.

나는 여러 가지 방법을 시도했습니다. 장치 관리자, 제어판, 설정, 블루투스에서 제거합니다. 작동하지 않습니다.

이것이 왜 문제가 됩니까?

블루투스 어댑터를 변경한다고 가정해 보겠습니다. 장치가 아직 거기에 있기 때문에 장치를 추가할 수 없습니다. 새 어댑터와 올바르게 페어링되지 않아서 연결할 수 없습니다.

장치 숨기기 해제를 시도했습니다. 장치 관리자에 다시 나타납니다.

일부 프로그램이 오래 전에 수행한 솔루션이 있습니다. 프로그램이 더 이상 존재하지 않습니다.

이것은 많은 Windows 10에서 발생하는 버그입니다.

어떻게 해야 하나요?

내 컴퓨터가 모든 Bluetooth 장치를 "잊고" 새 장치를 시작하기를 원합니다.

Bluetooth 장치는 모두 어디에 저장되어 있나요? 모두 삭제할 수 있습니다.

누군가 Powershell에 뭔가를 붙여넣으라고 말했습니다. Keith Miller의 답변과 같은 것입니다.

This is the result. not only device I really want to remove is not listed, I cannot remove any devices at all

    Select a device to remove (0 to Exit): 17
    Removing device: Mi Phone mimax 3
    Sorry, an error occured.
    
    ******** Bluetooth Devices ********
    
        1 - Generic Attribute Profile
        2 - Bluetooth LE Generic Attribute Service
        3 - Galaxy A70
        4 - Device Information Service
        5 - 小米蓝牙手柄
        6 - Bluetooth LE Generic Attribute Service
        7 - Generic Attribute Profile
        8 - Bluetooth LE Generic Attribute Service
        9 - Generic Access Profile
       10 - Lenovo A6000
       11 - Bluetooth LE Generic Attribute Service
       12 - MX Master
       13 - Generic Attribute Profile
       14 - Device Information Service
       15 - Device Information Service
       16 - BT-163
       17 - SMI-M1
       18 - Bluetooth LE Generic Attribute Service
       19 - Bluetooth LE Generic Attribute Service
       20 - Avantree Saturn Pro
       21 - Generic Access Profile
       22 - Bluetooth LE Generic Attribute Service
       23 - MX Master
       24 - Generic Access Profile
       25 - Bluetooth LE Generic Attribute Service
    
    Select a device to remove (0 to Exit): 24
    Removing device: Generic Access Profile
    Sorry, an error occured.
    

좀 더 낮은 수준의 솔루션을 찾고 있습니다. 일부 레지스트리 항목이나 일부 디렉터리를 제거하는 것과 같은 것입니다. 이러한 장치에 대한 모든 정보는 어디에 저장되나요? 그냥 삭제하고 싶어요

답변1

만약을 대비해 복원 지점을 만드세요. ~ 안에기기 관리자, 보기를 다음으로 전환 Devices by connection하고 삭제해 보세요 USB Host Controller.

여기에 이미지 설명을 입력하세요

상황을 감지하고 다시 시작하여 상황이 어떤지 확인하세요.



다음을 복사하여파워셸콘솔 창. <Enter>실행하려면 누르세요 :

$Source = @"
   [DllImport("BluetoothAPIs.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
   [return: MarshalAs(UnmanagedType.U4)]
   static extern UInt32 BluetoothRemoveDevice(IntPtr pAddress);

   public static UInt32 Unpair(UInt64 BTAddress) {
      GCHandle pinnedAddr = GCHandle.Alloc(BTAddress, GCHandleType.Pinned);
      IntPtr pAddress     = pinnedAddr.AddrOfPinnedObject();
      UInt32 result       = BluetoothRemoveDevice(pAddress);
      pinnedAddr.Free();
      return result;
   }
"@

Function Get-BTDevice {
    Get-PnpDevice -class Bluetooth |
      ?{$_.HardwareID -match 'DEV_'} |
         select Status, Class, FriendlyName, HardwareID,
            # Extract device address from HardwareID
            @{N='Address';E={[uInt64]('0x{0}' -f $_.HardwareID[0].Substring(12))}}
}

################## Execution Begins Here ################

$BTR       = Add-Type -MemberDefinition $Source -Name "BTRemover"  -Namespace "BStuff" -PassThru
$BTDevices = @(Get-BTDevice) # Force array if null or single item

Do {
   If ($BTDevices.Count) {
      "`n******** Bluetooth Devices ********`n" | Write-Host
      For ($i=0; $i -lt $BTDevices.Count; $i++) {
         ('{0,5} - {1}' -f ($i+1), $BTDevices[$i].FriendlyName) | Write-Host
      }
      $selected = Read-Host "`nSelect a device to remove (0 to Exit)"
      If ([int]$selected -in 1..$BTDevices.Count) {
         'Removing device: {0}' -f $BTDevices[$Selected-1].FriendlyName | Write-Host
         $Result = $BTR::Unpair($BTDevices[$Selected-1].Address)
         If (!$Result) {"Device removed successfully." | Write-Host}
         Else {"Sorry, an error occured." | Write-Host}
      }
   }
   Else {
      "`n********* No devices found ********" | Write-Host
   }
} While (($BTDevices = @(Get-BTDevice)) -and [int]$selected)

관련 정보