Configure NIC From CMD Line

Published on
1 mins read

Often times I work with network devices locally that require a static IP address. Once I am done I usually need to set my network adapter back to DHCP. I recently created a batch file to save me the hassle from going back to "Control Panel", etc.

netsh interface ip set address "Local Area Connection" dhcp
netsh interface ip set dns "Local Area Connection" dhcp

You can also use netsh to set a static IP address if you'd like.

netsh interface ip set address "connection name" static
netsh interface ip add dns "connection name"