通过组策略设置客户端DHCP获取IP地址及DNS

将计算机所有网卡设置为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




你可能感兴趣的:(计算机,source,interface,IP地址,Address)