您的位置:首页 > 编程语言 > PHP开发

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

2010-04-15 23:38 555 查看

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: