netsh

Windows CMD · Network · reference only

What it does

Windows network configuration tool: it shows and changes interfaces, the firewall, Wi-Fi and the network stack from the command line.

Syntax

netsh [contexto] [orden]

Options and parameters

  • interface ip show config

    Shows the IP configuration of all interfaces.

  • advfirewall show allprofiles

    Shows the Windows Firewall status in each profile.

  • advfirewall set allprofiles state on|off

    Turns the firewall on or off in all profiles.

  • wlan show profiles

    Lists the saved Wi-Fi network profiles.

  • winsock reset

    Resets the Winsock catalog; requires administrator and a restart.

  • -c contexto

    Enters a context directly, such as interface or advfirewall.

Usage examples

  • netsh interface ip show config

    Shows the IP addresses, gateway and DNS of each interface.

  • netsh advfirewall show allprofiles

    Checks whether the firewall is active in the domain, private and public profiles.

  • netsh wlan show profiles

    Lists the Wi-Fi networks the machine has connected to.

  • netsh winsock reset

    Resets the network stack when there are connection problems with no clear cause.

Notes and common mistakes

  • Most changes require a console with administrator rights.
  • Inside netsh you can type a context and navigate with ? to see the available commands.

Related commands