Add list-wifi.ps1

This commit is contained in:
Markus Fleschutz 2022-10-24 15:51:54 +02:00
parent 500e987190
commit 7cfcff426e
3 changed files with 23 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Lists all Bluetooth devices Lists Bluetooth devices
.DESCRIPTION .DESCRIPTION
This PowerShell script lists all Bluetooth devices. This PowerShell script lists all Bluetooth devices connected to the computer.
.EXAMPLE .EXAMPLE
PS> ./list-bluetooth-devices PS> ./list-bluetooth-devices
.LINK .LINK

View File

@ -189,6 +189,7 @@ function ListTools {
CheckFor mktemp "--version" CheckFor mktemp "--version"
CheckFor mount "--version" CheckFor mount "--version"
CheckFor MpCmdRun "-h" CheckFor MpCmdRun "-h"
CheckFor netsh ""
CheckFor nice "--version" CheckFor nice "--version"
CheckFor nohup "--version" CheckFor nohup "--version"
CheckFor nroff "--version" CheckFor nroff "--version"

20
Scripts/list-wifi.ps1 Normal file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Lists WIFI
.DESCRIPTION
This PowerShell script lists the WIFI networks.
.EXAMPLE
PS> ./list-wifi
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
& netsh wlan show profile
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}