Get Network Interface Names and Set All to DHCP Batch Script
问题 I am trying to make a batch that will get all of the Network Interface names (ex. 'Local Area Connection', 'Local Area Connection 2') and set them to DHCP. This is what I have so far : set netsh=wmic nic where "netconnectionid like '%%'" get netconnectionid for %%i in ("%netsh% | FIND /V 'Net'") do (netsh interface ip set address "%%i" dhcp) My output is : The filename, directory name, or volume label syntax is incorrect. Can anyone assist me in fixing this script, or proposing a better way