【发布时间】:2019-06-26 13:14:44
【问题描述】:
我知道如何检索活动连接并更改本地连接名称,但我想知道如何在一个脚本中完成它们,即检索活动的本地连接名称并将其更改为 LAN。
检索当前活动连接:
wmic.exe nic where "NetConnectionStatus=2" get NetConnectionID |more +1
将网络名称更改为:
NetSh interface set interface name="Ethernet" newname="LAN"
【问题讨论】:
标签: batch-file