Skip to content

Instantly share code, notes, and snippets.

@Bradford1040
Created June 2, 2025 09:42
Show Gist options
  • Select an option

  • Save Bradford1040/394ec7336246ce51af6dde7228aeb99e to your computer and use it in GitHub Desktop.

Select an option

Save Bradford1040/394ec7336246ce51af6dde7228aeb99e to your computer and use it in GitHub Desktop.

To restart network services in Windows, you can use the netsh command in Command Prompt. Specifically, you can use netsh winsock reset to reset Winsock settings, and netsh int ip reset to reset the TCP/IP stack. Additionally, using the ipconfig /flushdns command will clear the DNS cache.

Detailed Steps:

  1. Open Command Prompt as Administrator:

    • Search for "Command Prompt" in the Start menu.
    • Right-click on "Command Prompt" and select "Run as administrator".
  2. Restart Network Services:

    • Reset Winsock: Type netsh winsock reset and press Enter. This resets the Winsock catalog, which can help with network-related issues.

    • Reset TCP/IP Stack: Type netsh int ip reset and press Enter. This resets the TCP/IP stack, which can also resolve network problems.

    • Flush DNS Cache: Type ipconfig /flushdns and press Enter. This clears the DNS cache, which can help with resolving domain names.

  3. Optional: Release and Renew IP Address:

    • Type ipconfig /release and press Enter to release the current IP address.
    • Type ipconfig /renew and press Enter to obtain a new IP address from the DHCP server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment