Win32环境下命令行模式下禁用或启用网卡

某些时候,需要使用命令行来对网卡进行操作,在WINDOWS环境下,可以使用一下的方法进行禁用和开启网卡的操作!
先看"show interface"的结果, 然后选择你要disable的interface. 注意带空格的名称需要用引号.


运行如下命令:
netsh interface show interface
 
将显示类似下面的画面:
 
Admin State State Type Interface Name
--------------------------------------------------
Enabled Unreachable Dedicated Local Area Connection 2
Enabled Unreachable Dedicated Local Area Connection
Enabled Unreachable Internal Internal
Enabled Unreachable Loopback Loopback
 
运行如下命令禁用名称为"Local Area Connection"的网卡:
 
netsh interface set interface name="Local Area Connection" admin=DISABLED
 
把结尾的"DISABLED"改为"ENABLED"为开启指定的网卡.

Related posts:

  1. Linux单网卡绑多IP与多网卡共用单IP
  2. Running IIS 32-bit Applications on IIS 64-bit
  3. WordPress 后台主题赏析
  4. 丢失 WordPress MU 管理密码的处理方式

Tags: ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:mrgreen: :| :twisted: :arrow: 8O :) :? 8) :evil: :D :idea: :oops: :P :roll: ;) :cry: :o :lol: :x :( :!: :?: