i am wanting a simple command that can pair a bluetooth device through powershell
Try something like this, note that elevated permissions are required:
$device = Get-PnpDevice -class Bluetooth -friendlyname "FriendlyDeviceName"
Disable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false
Start-Sleep -Seconds 10
Enable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false
This script disables the device and after 10 seconds enables it again.
I hope this answers your question.
--If the reply is helpful, please Upvote and Accept as answer--
11 people are following this question.