Managing Bluetooth Devices (Part 2)

by May 4, 2022

If you’re just looking for a quick way in Windows to pair and unpair Bluetooth devices, try this command:

 
PS> explorer.exe ms-settings-connectabledevices:devicediscovery   
 

It immediately pops up a dialog showing all Bluetooth devices. Just add a function to PowerShell so you don’t have to remember the command, and place it in your profile script:

 
PS> function Show-Bluetooth { explorer.exe ms-settings-connectabledevices:devicediscovery }

PS> Show-Bluetooth    
 

If you’d rather place a shortcut on your desktop with a nice Bluetooth icon, try this:

$desktop = [Environment]::GetFolderPath('Desktop')
$path = Join-Path -Path $desktop -ChildPath 'bluetooth.lnk'
$shell = New-Object -ComObject WScript.Shell
$scut = $shell.CreateShortcut($path)
$scut.TargetPath = 'explorer.exe'
$scut.Arguments = 'ms-settings-connectabledevices:devicediscovery'
$scut.IconLocation = 'fsquirt.exe,0'
$scut.Save()

Twitter This Tip! ReTweet this Tip!