Network Shell (Netsh)Network Shell (Netsh)

适用于:Windows Server(半年频道)、Windows Server 2016Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

Network shell (netsh) 是一种命令行实用工具,使用该工具,你可以在运行 Windows Server 2016 的计算机上安装网络通信服务器组件之后配置和显示各种网络通信服务器角色和组件的状态。Network shell (netsh) is a command-line utility that allows you to configure and display the status of various network communications server roles and components after they are installed on computers running Windows Server 2016.

一些客户端技术,例如动态主机配置协议 (DHCP) 客户端和BranchCache,也提供 netsh 命令,通过这些命令,你可以配置运行 Windows 10 的客户端计算机。Some client technologies, such as Dynamic Host Configuration Protocol (DHCP) client and BranchCache, also provide netsh commands that allow you to configure client computers that are running Windows 10.

在大多数情况下,netsh 命令提供的功能与你使用每个网络服务器角色或网络功能的 Microsoft 管理控制台 (MMC) 管理单元时提供的功能相同。In most cases, netsh commands provide the same functionality that is available when you use the Microsoft Management Console (MMC) snap-in for each networking server role or networking feature. 例如,可以使用 NPS MMC 管理单元或 netsh nps 上下文中的 netsh 命令来配置网络策略服务器 (NPS) 。For example, you can configure Network Policy Server (NPS) by using either the NPS MMC snap-in or the netsh commands in the netsh nps context.

此外,还有一些用于网络技术的 netsh 命令,例如用于 IPv6、网桥和远程过程调用 (RPC) 的命令,这些命令在Windows Server 中不能作为 MMC 管理单元使用。In addition, there are netsh commands for network technologies, such as for IPv6, network bridge, and Remote Procedure Call (RPC), that are not available in Windows Server as an MMC snap-in.

重要

建议使用 Windows PowerShell(而非使用 Network Shell)管理 Windows Server 2016 和 Windows 10 中的网络技术。It is recommended that you use Windows PowerShell to manage networking technologies in Windows Server 2016 and Windows 10 rather than Network Shell. 但是,为了与脚本兼容,其中包含了 Network Shell 并支持使用。Network Shell is included for compatibility with your scripts, however, and its use is supported.

Network Shell (Netsh) 技术参考Network Shell (Netsh) Technical Reference

Netsh 技术参考提供了全面的 netsh 命令参考,包括语法、参数和 netsh 命令的示例。The Netsh Technical Reference provides a comprehensive netsh command reference, including syntax, parameters, and examples for netsh commands. 可以使用 Netsh 技术参考构建脚本和批处理文件,方法是使用 netsh 命令在运行 Windows Server 2016 和 Windows 10 的计算机上对网络技术进行本地或远程管理。You can use the Netsh Technical Reference to build scripts and batch files by using netsh commands for local or remote management of network technologies on computers running Windows Server 2016 and Windows 10.

内容可用性Content availability

可以从 TechNet 库中以 Windows Help (*.chm) 格式下载 Network Shell 技术参考:Netsh 技术参考The Network Shell Technical Reference is available for download in Windows Help (*.chm) format from TechNet Gallery: Netsh Technical Reference