Change Windows network IP address using console

The’s a way to change network configuration using Windows console, with this option you can set a new IP addess or switch bettwen static and dhcp,  Another interesting point of this is that you can do the same remotely using PsExec , I wrote a post time ago axplanating how it works, you can found just here.

First of all we need to know the name of desired interface, to do this we can execute the following command


After this we are able to change the interface configuration using this command

For example:

Or if you want to change an static ip to dhcp you can use:

You can define a new DNS servers too, this command is for primary one:

And this will change the secondary:

To set DNS using DHCP we will use:

That’s all, hope you’ll find this useful

Add a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.