Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Pair Bluetooth Devices via CMD in Windows

Bluetooth technology is widely used for wireless communication between devices. In the Windows environment, pairing Bluetooth devices typically involves using the graphical user interface (GUI). However, there may be scenarios where you need to pair devices via the Command Line (CMD) or PowerShell, such as in automated scripts or remote management situations. This article will guide you through the process of pairing Bluetooth devices using CMD and PowerShell in Windows.

Examples:

Using PowerShell to Pair Bluetooth Devices

  1. Open PowerShell as Administrator:

    • Press Win + X and select Windows PowerShell (Admin).
  2. Discover Bluetooth Devices:

    • Use the following command to list available Bluetooth devices:
      Get-PnpDevice -Class Bluetooth
    • Note the InstanceId of the device you want to pair.
  3. Pair the Bluetooth Device:

    • Use the following command to pair the device:
      Add-BluetoothDevice -DeviceInstanceId "YourDeviceInstanceId"
    • Replace "YourDeviceInstanceId" with the actual InstanceId obtained from the previous step.

Using CMD to Pair Bluetooth Devices

While CMD does not natively support Bluetooth pairing commands, you can use BluetoothCommandLineTools, a third-party tool, to achieve this. Follow these steps:

  1. Download and Install BluetoothCommandLineTools:

  2. Open CMD as Administrator:

    • Press Win + X and select Command Prompt (Admin).
  3. Navigate to the Directory:

    • Use the cd command to navigate to the directory where you extracted the BluetoothCommandLineTools.
      cd C:\path\to\BluetoothCommandLineTools
  4. Discover Bluetooth Devices:

    • Use the following command to list available Bluetooth devices:
      btpair -c
    • Note the MAC address of the device you want to pair.
  5. Pair the Bluetooth Device:

    • Use the following command to pair the device:
      btpair -b [MAC Address]
    • Replace [MAC Address] with the actual MAC address obtained from the previous step.

Conclusion

Pairing Bluetooth devices via CMD or PowerShell in Windows can be useful for automation and remote management. While PowerShell provides some built-in capabilities, using third-party tools like BluetoothCommandLineTools can extend the functionality to CMD.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.