• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Windows 10: How to set IP address using netsh but using MAC address?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.


Jul 18, 2012
So I have a dual port gigabit Ethernet card and I want to setup their IPs via a batch script.

I have used this and it works at the time I first wrote it.

    netsh interface ipv4 set address name="Ethernet" static
    netsh interface ipv4 set address name="Ethernet 2" static

But the problem is when I reinstalled Windows. Windows has swapped them so the IPs got swapped as well.

I am hoping to can help me with another script/command where I can use MAC address instead of "interface name" since this name can be swapped.



Premium Member
Mar 11, 2003
I hope I do not sound dumb but could you just change the script to reflect the change? As in, reverse the script to 'correct' the unwanted change. Again forgive me if it sounds dumb.