Reputation:
I am writing a small tool to simplify some of the stuff I do at work day to day, and the Windows GUI for adding IP's to the NIC is horrid. I am looking to find a decent way to...
Pull all Static IP's that are currently on the NIC (just to see a list)
Add either a single or range of IP's to the NIC
I found Configuring TCP/IP Settings using WMI and C# and THIS snippet for adding an IP to the NIC using netsh. What would be the best way to approach this and would solution should I use to do it?
Upvotes: 0
Views: 995
Reputation: 354
I had the same problem and after some research i choose WMI.
I think netsh is better if you use the script alone (i means not in a code). Personnaly i want to configure NIC in a c# code so WMI look more practical and i's quite easy to use it with a config file made in xml.
Upvotes: 1