- Published at
Configure NIC From CMD Line
Quickly go from a DHCP address to Static via command line.
Often 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 of 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.