Created
November 30, 2016 21:14
-
-
Save rleopold/b2af90f2261b33eb6bea8ecec76bbca0 to your computer and use it in GitHub Desktop.
a quick powershell script to make forgetting wifi networks easier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$networks = netsh wlan show profiles | select-string 'All User Profile' | |
if($networks.Count -gt 0) { | |
$(foreach ($item in $networks) { | |
$item.Line.Split(':')[1].Trim() | |
}) | Out-GridView -Title 'Select one or more neowrks to forget' -OutputMode Multiple | | |
foreach { | |
netsh wlan delete profile name = "$_" | |
} | |
} | |
else {'No wifi networks detected'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment