根据您提供的信息,可能是因为您在更改网络适配器名称时使用了无效的别名谓词。请尝试使用以下命令更改网络适配器名称:

set /p adapterName='Enter the current name of the network adapter you want to rename: '
wmic nic where 'NetConnectionID=%adapterName%' call rename 'net1'

这将提示您输入要更改的网络适配器的名称,并使用wmic命令将其重命名为'net1'。如果仍然无法自动检测网络适配器名称,请尝试使用以下命令获取所有网络适配器名称:

for /f "skip=1 delims=" %%a in ('wmic nic get NetConnectionID') do echo %%a

然后,您可以将其与上面的命令结合使用,以自动检测网络适配器名称并更改其名称。

使用bat脚本自动更改网卡名称

原文地址: https://www.cveoy.top/t/topic/jC09 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录