Skip to content

Instantly share code, notes, and snippets.

@rleopold
Created November 30, 2016 21:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rleopold/b2af90f2261b33eb6bea8ecec76bbca0 to your computer and use it in GitHub Desktop.
Save rleopold/b2af90f2261b33eb6bea8ecec76bbca0 to your computer and use it in GitHub Desktop.
a quick powershell script to make forgetting wifi networks easier
$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