Skip to content

Instantly share code, notes, and snippets.

@swarupsro
Last active November 21, 2025 15:37
Show Gist options
  • Select an option

  • Save swarupsro/57ac3b95d0c156a7cda91902292e65dc to your computer and use it in GitHub Desktop.

Select an option

Save swarupsro/57ac3b95d0c156a7cda91902292e65dc to your computer and use it in GitHub Desktop.
Windows Network Reset & Refresh
@echo off
:: =======================================
:: Windows Network Reset & Refresh Script
:: =======================================
:: Check Admin Privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
echo.
echo [!] Please RUN AS ADMINISTRATOR.
echo Script cannot proceed without admin rights.
echo.
pause
exit /b
)
color 0A
echo ============================================
echo WINDOWS NETWORK RESET UTILITY
echo ============================================
echo.
echo [1] Resetting Winsock...
netsh winsock reset
echo --------------------------------------------
echo [2] Resetting TCP/IP stack...
netsh int ip reset all
echo --------------------------------------------
echo [3] Flushing DNS cache...
ipconfig /flushdns
echo --------------------------------------------
echo [4] Releasing current IP address...
ipconfig /release
echo --------------------------------------------
echo [5] Renewing IP address...
ipconfig /renew
echo --------------------------------------------
echo.
echo ============================================
echo All tasks completed successfully!
echo Please restart your computer.
echo ============================================
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment