I need to change the IP gateway on a number of systems and thought it would be faster if I developed a script. Research I have done indicates use of NETSH, but I have not found command line to change the GATEWAY only... All systems have a static IP address... Thanks for any help provided....!
need a method to change IP gateway only by script
Started by speedi, May 05 2008 02:34 PM
4 replies to this topic
#1
Posted 05 May 2008 - 02:34 PM
#2
Posted 05 May 2008 - 03:10 PM
You can use netsh:
[ code='text' ] ( Popup )
netsh interface ip add address "local area connection" gateway=100.1.1.5 gwmetric=2

My empty homepage: http://www.fallenstar.net
#3
Posted 05 May 2008 - 03:29 PM
weaponx, on May 5 2008, 09:10 AM, said:
You can use netsh:
[ code='text' ] ( Popup )
netsh interface ip add address "local area connection" gateway=100.1.1.5 gwmetric=2
RunWait("netsh interface ip add address ""local area connection"" gateway=100.1.1.5 gwmetric=2")
that worked great! Thanks!
#5
Posted 05 May 2008 - 08:50 PM
speedi, on May 5 2008, 02:49 PM, said:
Question: What does the gwmetric=2 accomplish???? Thanks!
Not sure but I don't think it will work without it. See here:
http://technet2.microsoft.com/windowsserve...3.mspx?mfr=true
Edited by weaponx, 05 May 2008 - 08:52 PM.

My empty homepage: http://www.fallenstar.net
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













