netsh import 不起作用

netsh import 不起作用

我正在尝试使用 netsh 导出然后导入我的网络设置。我设法使用以下命令导出我的设置:

netsh -c interface dump > c:\settings.txt

文件已创建,一切正常,但是当我尝试导入文件时,使用:

netsh -f c:\settings.txt

我得到以下信息:

Resetting Global, OK!
Resetting , failed.
Access is denied.

Restart the computer to complete this action.
Resetting Interface, OK!
Resetting , failed.
Access is denied.

Restart the computer to complete this action.
The following command was not found: reset.

Reset of all TCP parameters OK!

The congestionprovider parameter can be set using the
'netsh int tcp set supplemental' command.
The parameter is incorrect.

The following command was not found: reset.

我在 Windows 8 上以管理员权限运行命令提示符。

我需要这个,因为我在多个地方工作,在其中一个地方我必须设置一些代理设置,我想以某种方式自动化这个操作。

编辑:这是设置文件:

#========================
# Interface configuration
#========================
pushd interface 
popd
# End of interface configuration

# ----------------------------------
# IPHTTPS Configuration
# ----------------------------------
pushd interface httpstunnel
reset
popd
# End of IPHTTPS configuration

# ----------------------------------
# IPv4 Configuration
# ----------------------------------
pushd interface ipv4
reset
set global icmpredirects=enabled
popd
# End of IPv4 configuration

# ----------------------------------
# IPv6 Configuration
# ----------------------------------
pushd interface ipv6
reset
set interface interface="Ethernet" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="Wi-Fi" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="Bluetooth Network Connection" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="(my proxy goes here)" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="Teredo Tunneling Pseudo-Interface" forwarding=enabled advertise=enabled mtu=1280 nud=enabled ignoredefaultroutes=disabled
set interface interface="Local Area Connection* 12" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="isatap.{A049BA26-6AB7-4880-9D9C-1CD3E579C8E0}" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
set interface interface="isatap.{1B39EAEE-CBD8-406C-928F-FB0F83DC49E5}" forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled
popd
# End of IPv6 configuration

# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface isatap
popd
# End of ISATAP configuration

# ----------------------------------
# 6to4 Configuration
# ----------------------------------
pushd interface 6to4
reset
popd
# End of 6to4 configuration

# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface isatap
popd
# End of ISATAP configuration

#========================
# Port Proxy configuration
#========================
pushd interface portproxy
reset
popd
# End of Port Proxy configuration

# ----------------------------------
# TCP Configuration
# ----------------------------------
pushd interface tcp
reset
set global rss=enabled chimney=disabled autotuninglevel=normal congestionprovider=none ecncapability=disabled timestamps=disabled netdma=disabled dca=disabled initialrto=3000 rsc=enabled
popd
# End of TCP configuration

# ----------------------------------
# Teredo Configuration
# ----------------------------------
pushd interface teredo
set state type=client servername=teredo.ipv6.microsoft.com. servervirtualip=0.0.0.0
popd
# End of Teredo configuration

# ----------------------------------
# 6to4 Configuration
# ----------------------------------
pushd interface 6to4
reset
popd
# End of 6to4 configuration

答案1

看过之后http://technet.microsoft.com/en-us/library/cc732279(v=ws.10).aspx几分钟后,我想也许你应该尝试一下

“netsh -c 接口 -f C:\settings.txt”。

如果这不管用,http://technet.microsoft.com/en-us/library/ee404790.aspx指出“Windows Server® 2003、Windows Server® 2008 和 Windows Server® 2008 R2 上的 netsh 命令之间存在功能差异”,并包含一些指向其他信息的链接,包括大量有关权限的信息。该旅程从上面的 ...cc732279... url 开始。

相关内容