The NetShell utility (netsh) is a command-line, scripting interface for configuring and monitoring Windows. The configuration tool provides an interactive shell interface to the user. The front end is the command shell that accepts your commands, and the back end is a helper that corresponds to a system component or utility. A helper is a Dynamic Link Library file (.dll) that extends the functionality of netsh. A helper provides configuration and/or monitoring support for one or more services, utilities, or protocols, but helpers can also be used to extend other helpers. The command shell directs the command to the appropriate helper, and the helper carries out the command.
The netsh command allows you to run the NetShell utility to display or modify the configuration of a currently running computer. It also provides a scripting feature that you can use to run a collection of commands in batch mode against a specified computer.
The command shell provides for contexts, which are groupings of netsh commands for specific networking components. A context is identified by a string that is appended to commands. Commands entered in a given context are passed to an associated helper. The contexts available depend on the Windows components installed. For example, typing routing at the netsh command changes to the routing context. Typing ras at the netsh command changes to the ras (remote access portion of the Routing and Remote Access service) context.
Subcontexts may exist within each context. For example, within the routing context, you can change to the ip and ipx subcontexts.
NETSH [-a aliasfile] [-c context] [-r remotecomputer] [command | -f scriptfile]
To display a list of subcontexts and commands that can be used in a context, at the netsh prompt, type the context name, followed by a space and ?. For example, to display a list of subcontexts and commands that can be used in the routing context, at the netsh prompt, type:
These additional commands can be used with Netsh. Optional parameters are shown in brackets ([ ]). Alternative entries are shown with a pipe (|) between them.