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

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
}