Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile
@cmwylie19
cmwylie19 / Get-WiFiProfiles.ps1
Created September 25, 2023 22:40 — forked from Noxsios/Get-WiFiProfiles.ps1
Get-WiFi-Profiles using netsh and store in a TOML file for easy reading.
if (!(Test-Path "./profiles.toml")) {
New-Item -ItemType File "./profiles.toml" | Out-Null
}
"#####`n[profiles]" | Out-File -Append -Encoding utf8 "./profiles.toml"
(netsh wlan show profiles) |
Select-String "\:(.+)$" |
ForEach-Object {
$name = $PSItem.Matches.Groups[1].Value.Trim()