question

willb-6351 avatar image
0 Votes"
willb-6351 asked LimitlessTechnology-2700 answered

is it possible to pair a bluetooth device through powershell

i am wanting a simple command that can pair a bluetooth device through powershell

windows-11
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi willb-6351,

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--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.