I'm trying to write a few short scripts with netsh. One to change an adapter to static addressing and one to change the same adapter back to DHCP.
I can get the adapter set with all of the correct static address settings with
netsh interface ip set address "Local Area Connection" static 10.61.1.253 255.255.255.0 10.61.1.1 1
This works fine. When I run the following command (a script) to switch back to DHCP I get an error message.
netsh interface ip set address "Local Area Connection" dhcp
DHCP is already enabled on this interface.
This is on a Windows 7 machine.
Any idea what the problem is?
netsh
is not a "software tool primarily used by programmers"? Who uses it primarily, MBAs? – Beall