NETSH Commands

NETSH (Network Shell) is a Windows command-line utility for managing network related configurations, including configuration of devices, components, and client or server roles on a local or remote system.

NETSH Windows 10 command help

Example uses of NETSH include

  • Display or change your network¬†interface settings, (eg IP address, subnet mask, DNS client settings, etc)
  • Manage your Windows Firewall rules (service settings, firewall rules, etc)
  • Configure DHCP server settings (scopes, reservations, scope options, etc)

 

Netsh Command Syntax

NETSH can be run in interactive move, or in non-interactive mode.

netsh Enters into a netsh> interactive mode shell.  From here, you can type various netsh commands.

  • help or ? to display a list of netsh commands
  • enter a specific command
  • change contexts
  • type exit to return to the command prompt.
netsh command Instructs netsh to run a command and exit back to the current command prompt (non-interactive mode)
netsh command ? Instructs netsh to display help for specified command and exit back to the current command prompt (non-interactive mode)

 

NETSH Contexts

NETSH has a concept of contexts and subcontexts. Each context has it’s own group of commands and not all contexts are available on a given systems. This is because NETSH is not just a single command but instead, it works with other DLLs on the system to augment its capabilities. For example, you would not have the NETSH dhcp server context available to you unless your system had the DHCP server role installed. Depending on the Windows features and Roles installed, additional DLLs would be exposed to extend NETSH’s functionality.

 

Add a Comment

Your email address will not be published. Required fields are marked *