Skip to content

Instantly share code, notes, and snippets.

@bearlikelion
Created April 25, 2018 02:48
Show Gist options
  • Save bearlikelion/f0144cbadb776f3ed1cfd8185caa3484 to your computer and use it in GitHub Desktop.
Save bearlikelion/f0144cbadb776f3ed1cfd8185caa3484 to your computer and use it in GitHub Desktop.
netsh autoconfig toggle
# Get autoconfig status and store as variable $Status
$Status = netsh.exe wlan show autoconfig
# Switch autoconfig status
if ($Status -like '*enabled*') {
Write-Host "Disabling autoconfig"
netsh.exe wlan set autoconfig enabled=no interface="Wi-Fi 4"
} else {
Write-Host "Enabling autoconfig"
netsh.exe wlan set autoconfig enabled=yes interface="Wi-Fi 4"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment