Windows cmd命令提示符重启网卡(网络适配器)

🏷️ wwwBet365 📅 2025-10-06 05:13:19 👤 admin 👁️ 4720 ❤️ 632
Windows cmd命令提示符重启网卡(网络适配器)

目录

1.查询计算机上所有的网卡(包括虚拟网卡)

2.操作网卡的指令

3.以虚拟网卡VMnet8为例,重启网卡

4.使用bat批处理(可选)

1.查询计算机上所有的网卡(包括虚拟网卡)

命令行输入:

netsh interface show interface

2.操作网卡的指令

关闭网卡:

netsh interface set interface "要操作的网卡名称" disable

开启网卡:

netsh interface set interface "要操作的网卡名称" enable

3.以虚拟网卡VMnet8为例,重启网卡

netsh interface set interface "VMware Network Adapter VMnet8" disable

netsh interface set interface "VMware Network Adapter VMnet8" enable

注意:要以管理员的身份运行!!!

成功重启!

4.使用bat批处理(可选)

如果需要经常重启这张网卡的话,可以保存到bat批处理文件中去,不用再反复的敲命令行了,解放双手更方便。复制我的代码,将VMware Network Adapter VMnet8替换为你要重启的网卡名称即可。

代码如下:

@echo off

echo.

echo 正在重启网卡VMnet8

netsh interface set interface "VMware Network Adapter VMnet8" disable

echo 网卡已关闭

netsh interface set interface "VMware Network Adapter VMnet8" enabled

echo 网卡重启成功

pause

以管理员的身份运行bat程序

大功告成!!!

补充:更懒的人还可以将bat程序设置开机自启等,比如:

将其添加到开机自启文件夹,参考链接:window10设置开机后自启动.bat文件

将其添加到任务计划中去,参考链接:Windows通过计划任务定时执行bat文件

相关内容

塞尔达传说系列
约彩365ios下载

塞尔达传说系列

📅 08-10 👁️ 6225
U17男篮世界杯-中国队排位赛胜几内亚队 获第13名
约彩365ios下载

U17男篮世界杯-中国队排位赛胜几内亚队 获第13名

📅 08-05 👁️ 7433
回顾徐翔案:为何被定操纵证券市场罪而非内幕交易罪?
365直播网网络电视台

回顾徐翔案:为何被定操纵证券市场罪而非内幕交易罪?

📅 08-17 👁️ 1812