mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-23 23:29:02 +01:00
Add list-bluetooth-devices.ps1
This commit is contained in:
parent
494c697861
commit
7b0ef3ab6a
20
Scripts/list-bluetooth-devices.ps1
Executable file
20
Scripts/list-bluetooth-devices.ps1
Executable file
@ -0,0 +1,20 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists all Bluetooth devices
|
||||
.DESCRIPTION
|
||||
This script lists all Bluetooth devices.
|
||||
.EXAMPLE
|
||||
PS> ./list-bluetooth-devices
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user