How to use Netsh.exe tools and command line switches

xiaoxiao2021-03-06  95

This page

Summary More Information

summary

Netsh.exe is an administrator to configure and monitor tools based on Windows 2000-based computers on a command prompt. With the Netsh.exe tool, you can direct the entered environment command to the appropriate help, execute the command by the Helper. Help is a dynamic link library (.dll) file that expands the functionality of the Netsh.exe tool by providing configuration, monitoring, and supporting a (or more) service, tools, or protocol. Help can also be used to extend the functions of other helper.

More information

You can do the following tasks using the Netsh.exe tool:

• Configure the interface. • Configure the interface. • Configure filter. • Configure routing. • Configure remote access features of a Windows 2000-based remote access router (it runs Routing and Remote Access Server (RRAS) services). • Displays the configuration of the current Running Run on any computer. • Use script capabilities to run a set of specified router commands in a batch mode. The syntax of the Netsh.exe tool is:

Netsh [-r router name] [-A aliasfile] [-c context] [command | -f scriptfile]

To display a list of sub-contexts and commands that can be used in the context, type the context name, followed by the NETSH> command prompt, followed by spaces and? For example, to display a list of sub-contexts and commands that can be used in / routing context, type it in the Netsh> command prompt.

Routing?, press ENTER.

Context

The context string is attached to the Netsh.exe tool command and is passed to the related help. Help can have one or more entry points that are mapped to the context. Some contexts that can be used in Netsh.exe tools are:

Context command: / dhcp

Result: Changed to Dynamic Host Configuration Protocol (DHCP) context.

Context command: / ras

Result: Change to Remote Access Server (RAS) context.

Context command: / routing

Result: Change to routing context.

Context command: / Wins

RESULTS: Change to Windows Internet Naming Services (WINS) context.

The context can also be nested in other contexts. For example, the following context runs in Netsh> Ras context:

Context command: / ip

Result: Change to the Internet Protocol (IP) context.

Context command: / ipx

RESULTS: Changed to InterCAd Packet Exchange (IPX) context.

Context command: / netbeui

RESULTS: Changed to NetBIOS Enhanced User Interface (NetBeui) context.

The following sub-context is running in Netsh> Routing IP context:

Context command: / autodhcp

RESULTS: Changed to AutodHCP sub context.

Context command: / DNSProxy

RESULTS: Changed to DNSProxy sub context.

Context command: / igmp

RESULTS: Changed to the Internet Group Member Protocol (IGMP) sub-context.

Context command: / mib

RESULTS: Changed to Management Information Library (MIB) sub context.

Context command: / nat

Result: Change to Network Address Translation (NAT) sub context.

Context command: / OSPF

RESULTS: Changed to Open Maximum Path Priority (OSPF) sub context.

Context command: / relay

RESULTS: Changed to the trunk context.

Context Command: / RIP Result: Change to Routing Information Protocol (RIP) sub context.

Netsh.exe command

The following additional commands can be used with Netsh.exe tools:

Remarks: Optional parameters are enclosed in a square bracket ([]). The replacement item is separated from the pipe symbol (|).

Context command: /?

Result: Display help.

Context command: / Abort

RESULTS: Any changes to the offline mode are abandoned. There is no effect in online mode.

Context command: / add helper DLL-NAME

RESULTS: Install the helper .dll file in Netsh.exe.

Context command: / alias [alias-name] [String1] [string2 ...]

RESULTS: If / alias, all alias is listed. If / alias

Alias-name, an equivalent string is displayed. If / alias

Alias-name string1 string2 ..., set the alias to the specified string.

Context command: / bye

Result: Exit the program.

Context command: / commit

RESULTS: Any changes to the route will be submitted to the router in offline mode. There is no effect in online mode.

Context command: / delete helper

.dll file name

RESULTS: Delete the helper .dll file in Netsh.exe.

Context command: / dump -

FILE NAME

RESULTS: Dumps or attached to text files.

Context command: / EXEC

Script File Name

Result: Load the script file and perform the commands.

Context command: / EXIT

Result: Exit the program.

Context command: / h

Result: Display help.

Context command: / Help

Result: Display help.

Context command: / offline

RESULTS: Set the current mode to offline. Save any changes made in this mode, but need to set the "commit" or "online" command in the route.

Context command: / online

Result: Set the current mode to an online. Any changes made in this mode are immediately reflected in the router.

Context command: / popd

RESULTS: The context pops up from the stack.

Context command: / pushd

RESULTS: Push the current context into the stack.

Context command: / quit

Result: Exit the program.

Context command: / set mode [Mode =] online | Offline

Result: Set the current mode to an online or offline.

Context Command: / show alias | Helper | MODE

Result: If you / show alias, all defined alias is listed. If you / show helper, all top-level helper is listed. If it is / show mode, the current mode is displayed.

Context command: / unalias

Alias ​​Name

RESULTS: Delete the specified alias.

Available helpful dynamic link library files

Routing and Remote Access IP Configuration - IPMontr.dll

Routing and Remote Access IPX Configuration - IPXMONTR.DLL

Interface - IFMon.dll

Ras - rasmontr.dll

DHCP - DHCPMON.DLL

WINS - Winsmon.dll

Assister Dynamic Link Library file related registry key

HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Netsh /

REG_SZ: IPMontr.dll

REG_SZ: ipxmontr.dll

REG_SZ: IFMon.dll

RASMONTR.DLL

REG_SZ: DHCPMON.DLL

REG_SZ: Winsmon.dll

The information in this article applies to:

• Microsoft Windows 2000 Enterprise Edition • Microsoft Windows 2000 Enterprise Edition • Microsoft Windows 2000 PROFESSIONAL Edition • Microsoft Windows 2000 Enterprise Edition

Back to top

Keywords: kbinfo kbNetwork Kbtool KB242468

转载请注明原文地址:https://www.9cbs.com/read-96017.html

New Post(0)