List MAC of Bluetooth devices on Windows
Find the MAC address of a Bluetooth device in Windows from Windows Device Manager under Bluetooth, (select device in list), Properties, Details, Bluetooth Device Address.
List all Bluetooth devices and their MAC addresses from PowerShell:
$devices = Get-PnpDevice | Where-Object { $_.Class -eq "Bluetooth" -and $_.FriendlyName }
$results = foreach ($device in $devices) {
$id = $device.InstanceId
$name = $device.FriendlyName
$addressProp = Get-PnpDeviceProperty -InstanceId $id -ErrorAction SilentlyContinue |
Where-Object { $_.KeyName -like "*Address*" -and $_.Data -match '^\w{12}$' } |
Select-Object -First 1
if ($addressProp) {
$raw = $addressProp.Data.ToUpper()
$bytes = for ($i = 0; $i -lt 12; $i += 2) {
[convert]::ToByte($raw.Substring($i, 2), 16)
}
[array]::Reverse($bytes)
$mac = ($bytes | ForEach-Object { $_.ToString('X2') }) -join ':'
[PSCustomObject]@{ Device = $name; 'MAC Address' = $mac }
}
}
$results | Format-Table -AutoSize