windows - 如何使用 PowerShell 列出我附近的蓝牙设备

标签 windows powershell bluetooth netsh

如何列出所有配对或当前靠近我的蓝牙设备和特定的 MAC 地址?我想要等效的命令:

netsh wlan show network mode=bssid
我可以使用以下命令列出所有蓝牙设备和特征,但不能列出 MAC 地址:
Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"}
foreach ($device in $devices) { echo $device.InstanceId }
请注意,如果我需要手动缩小结果并且列表布局不完美,这不是问题。

最佳答案

PowerShell 命令:

Get-ChildItem -Path HKLM:\SYSTEM\ControlSet001\Services\DeviceAssociationService\State\Store\ | Select-String -Pattern Bluetooth
将打印已配对的设备:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DeviceAssociationService\State\Store\Bluetooth#BluetoothXX:XX:XX:XX:XX:b2-YY:YY:YY:YY:YY:YY
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DeviceAssociationService\State\Store\Bluetooth#BluetoothXX:XX:XX:XX:XX:b2-ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DeviceAssociationService\State\Store\BluetoothLE#BluetoothLEXX:XX:XX:XX:XX:b2-WW:WW:WW:WW:WW:WW
XX:XX:XX:XX:XX values 是您的蓝牙 MAC 地址。

关于windows - 如何使用 PowerShell 列出我附近的蓝牙设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64888963/

相关文章:

python 无法识别 windows 10

c - C 和 D 中相同的_exact_代码会给出不同的结果——为什么?

c# - 使用 C# 更改本地 Windows 用户属性

powershell - 如何阻止 ConvertTo-HTML 创建空表?

ios - UISupportedExternalAccessoryProtocols 的蓝牙协议(protocol)名称

Java 剪贴板粘贴检查器?

powershell - Powershell-单击HTML代码上的提交按钮

powershell - 获取 Write-Verbose 消息输出以显示在 PowerShell 模块脚本代码中

printing - 如何避免打印后重启蓝牙打印机?

ios - 我想触发 iOS7 询问用户使用蓝牙和 Twitter 帐户的权限