Skip to content

Instantly share code, notes, and snippets.

@turbq
Created October 6, 2023 10:18
Show Gist options
  • Select an option

  • Save turbq/9d10e734bf0c81fca38947a7054fc5ce to your computer and use it in GitHub Desktop.

Select an option

Save turbq/9d10e734bf0c81fca38947a7054fc5ce to your computer and use it in GitHub Desktop.

Revisions

  1. turbq created this gist Oct 6, 2023.
    4 changes: 4 additions & 0 deletions BtDeviceRestart.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    $device = Get-PnpDevice -class Bluetooth -friendlyname "FriendlyDeviceName"
    Disable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false
    Start-Sleep -Seconds 2
    Enable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false