NETSH 如何扩展其功能?如何适配netsh使其支持SCTP协议?

NETSH是一款用于配置和监控Windows系统的命令行工具。它提供交互式的外壳界面,支持在线模式和离线模式操作,并允许通过脚本批量执行命令。NETSH支持多种上下文,如路由、远程访问等,每个上下文对应不同的网络组件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

NETSH


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

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.


Syntax

NETSH /?

NETSH [-a aliasfile ] [-c context ] [-r remotecomputer ] [command | -f scriptfile ]


Parameters

command ( NT2000 )
?

Switches

/? ( NTXP )
Displays help.
-a aliasfile ( NT2000 )
?
-c context ( NT2000 )
?
-f scriptfile ( NT2000 )
?
-r remotecomputer ( NT2000 )
?

Related

none.


Notes

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:

    netsh>routing ?

Netsh Commands:

These additional commands can be used with Netsh. Optional parameters are shown in brackets ([ ]). Alternative entries are shown with a pipe (|) between them.

  • ? Displays help.
  • abort Discards any changes made in offline mode. No effect in online mode.
  • add helper DLL_name Installs the helper DLL.
  • alias [alias_name] Displays the equivalent string.
  • alias [alias_name] [string1] [string2] ... Sets alias_name to the specified strings.
  • alias Lists all aliases.
  • bye Exits the program.
  • commit Commits any changes made in the offline mode to the router. No effect in the online mode.
  • delete helper DLL_name Removes the helper DLL.
  • dump -file_name Dumps or appends configuration to a text file.
  • exec Script_file_name Loads the script file and executes commands from it.
  • exit Exits the program.
  • h Displays help.
  • help Displays help.
  • offline Sets the current mode to offline. Any changes made in this mode will be saved, but require a commit or online command to be set in the router.
  • online Sets the current mode to online. Any changes in this mode will be immediately reflected in the router.
  • popd Pops a context from the stack.
  • pushd Pushes current context onto the stack.
  • quit Exits the program.
  • set file [open file_name | append file_name | close] Copies the Command Prompt window output to a file. NT2003
  • set machine [[//computer_name=]string] Sets the current computer on which to perform configuration tasks. NT2003
  • set mode [mode =] online | offline Sets the current mode to online or offline.
  • show alias Lists all defined aliases.
  • show helper Lists all top-level helpers.
  • show mode Shows the current mode.
  • unalias alias_name Deletes the specified alias.

Examples

none.


Errorlevels

none.


Availability

External
DOS
none
Windows
none
Windows NT
NT2000 NTXP NT2003

Last Updated: 2003/07/28
Direct corrections or suggestions to: Rick Lively

 

From: http://or8.net/~aj/Windows_Total_Command/COMMANDS/N/NETSH.HTM

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值