根据Windows Server 2008和Windows Server 2008 R2中的有线局域网(LAN)的Netsh命令 ,netsh应提供如下命令
netsh add profile filename="profile.xml" interface="Local Area Connection"
但对我的networking来说这是一个未知的命令。
即使我进入
netsh show /?
它显示我只有两个选项:“显示别名”和“显示帮助”。 也许一些图书馆/模块或东西丢失?
我在PowerShell中使用pipe理权限进行了testing。
您需要在netsh的“lan”上下文中使configuration文件命令可以访问:
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>
netsh /?
将显示该命令的所有可用选项。