Networking

netsh 不提供命令

  • November 2, 2012

根據Windows Server 2008 和 Windows Server 2008 R2 中有線區域網路 (LAN) 的 Netsh 命令,netsh 應提供以下命令

netsh add profile filename="profile.xml" interface="Local Area Connection"

但這對我的 netsh 來說是一個未知的命令。

即使我進入

netsh show /? 

它只顯示了兩個選項:“顯示別名”和“顯示助手”。也許一些庫/模組或某些東西失去了?

我在 PowerShell 中使用管理員權限進行了測試。

您需要在 netsh 的“區域網路”上下文中才能訪問配置文件命令:

C:\Users\kce>netsh lan add profile /?

Usage:  add profile [filename=]<string>  [interface=]<string>

Parameters:

  filename  - name of the profile XML file
  interface - interface name

Remarks:

  Parameter filename is required.
  It is the name of the XML file containing the profile data.

  Parameter interface is optional. It is one of the interface name shown
  by "netsh lan show interface" command. If interface name is given,
  the profile will be added to the specified interface, otherwise the
  profile will be added on all wired interfaces.

Examples:

  add profile filename="Profile1.xml" interface="Local Area Connection"


C:\Users\kce>

引用自:https://serverfault.com/questions/423088