将计算机所有网卡设置为DHCP自动获取IP地址
for /f "skip=3 tokens=3,*" %a in (‘netsh interface show interface‘) do netsh interface ipv4 set address name="%b" source=dhcp
for /f "skip=3 tokens=3,*" %a in (‘netsh interface show interface‘) do netsh interface ipv4 set dnsservers name="%b" source=dhcp
时间: 2024-10-28 06:26:32