Configure network connections with the Command Prompt / PowerShell


Software: Windows 7, 8 & 10 | Last modified on 2018-06-18


A guide to configuring and resetting network connections with the Command Prompt or PowerShell.

Reset all network settings


  1. Open the Command Prompt (Admin) or PowerShell (Admin).
  2. Execute netsh winsock reset
  3. Execute netsh int ip reset
  4. Execute ipconfig /renew
  5. Execute ipconfig /flushdns
  6. Execute netcfg –d
  7. Restart the computer.


Netsh Winsock commands


  1. The following commands are available for netsh winsock:

    • audit : Displays a list of Winsock LSPs that have been installed and removed.
    • dump : Displays a configuration script.
    • remove : Removes a Winsock LSP from the system.
    • reset : Resets the Winsock Catalog to a clean state.
    • set : Sets Winsock options.
    • show : Displays information.


Netsh Int Ip commands


  1. The following commands are available for netsh int ip:

    • add : Adds a configuration entry to a table.
    • delete : Deletes a configuration entry from a table.
    • dump : Displays a configuration script.
    • install : Install the IP protocol.
    • reset : Reset the IP configurations.
    • set : Sets configuration information.
    • show : Displays information.
    • uninstall : Uninstall the IP protocol.


Ipconfig commands

You can use the ipconfig commands to clear or reset very specific settings within the network settings.

  1. The following commands are available for ipconfig:

    • /all : Display full configuration information.
    • /release : Release the IPv4 address for the specified adapter.
    • /release6 : Release the IPv6 address for the specified adapter.
    • /renew : Renew the IPv4 address for the specified adapter.
    • /renew6 : Renew the IPv6 address for the specified adapter.
    • /flushdns :Purges the DNS Resolver cache.
    • /registerdns :R efreshes all DHCP leases and re-registers DNS names.
    • /displaydns : Display the contents of the DNS Resolver Cache.
    • /showclassid : Displays all the dhcp class IDs allowed for adapter.
    • /setclassid : Modifies the dhcp class id.
    • /showclassid6 : Displays all the IPv6 DHCP class IDs allowed for adapter.
    • /setclassid6 : Modifies the IPv6 DHCP class id.


Netcfg commands


  1. The following commands are available for netcfg:

    • netcfg -d : Performs a cleanup on all networking devices. This will require a restart.
    • netcfg -x : Performs a cleanup on networking devices, skipping those without physical object names. This will require a restart.

Search
Support
Can't find the answer you're looking for? Click here to submit a ticket.