Use netsh to set a static IP

Since I often seem to forget the correct syntax for setting a static IP address using netsh, I’ve decided to blog it then I know where to come to remind myself!

netsh interface ipv4 set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1
netsh interface ipv4 set dns "Local Area Connection" static 192.168.0.1

And when setting back to DHCP

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>