Skip to content

Instantly share code, notes, and snippets.

@IslandOfCode
Created November 17, 2019 14:57
Show Gist options
  • Save IslandOfCode/ed825d5b05667b8aa2cf28d8a82d0af6 to your computer and use it in GitHub Desktop.
Save IslandOfCode/ed825d5b05667b8aa2cf28d8a82d0af6 to your computer and use it in GitHub Desktop.
Common wlan command to reset wifi connection
@echo off
net session >nul 2>&1
if not %errorLevel% == 0 (
echo Admin right needed
pause
exit
)
echo 1. Reset WinSock catalog
netsh winsock reset catalog
echo 2. IPv4 protocol reset
netsh int ipv4 reset C:\reset4.log
echo 3. IPv6 protocol reset
netsh int ipv6 reset C:\reset6.log
echo 4. IP release (DHCP)
ipconfig /release
echo 5. IP renew (DHCP)
ipconfig /renew
echo 6. Set wlan service to auto-start (even if already set)
sc config WlanSvc start=auto
echo 7. Force start wlanSvc service (do nothing if already started)
sc start WlanSvc
echo
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment