cmd重启网卡
在Windows系统中,可以通过以下步骤在cmd中重启网卡:
1. 首先,查询计算机上所有的网卡(包括虚拟网卡),可以使用命令`netsh interface show interface`。
2. 关闭网卡,使用命令`netsh interface set interface \"要操作的网卡名称\" disable`。
3. 开启网卡,使用命令`netsh interface set interface \"要操作的网卡名称\" enable`。
例如,以虚拟网卡VMnet8为例,可以输入以下命令来重启网卡:
1. 查询网卡:netsh interface show interface。
2. 关闭网卡:netsh interface set interface \"VMware Network Adapter VMnet8\" disable。
3. 开启网卡:netsh interface set interface \"VMware Network Adapter VMnet8\" enable。

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