speedi Posted May 5, 2008 Share Posted May 5, 2008 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....! Link to comment Share on other sites More sharing options...
weaponx Posted May 5, 2008 Share Posted May 5, 2008 You can use netsh: netsh interface ip add address "local area connection" gateway=100.1.1.5 gwmetric=2 Link to comment Share on other sites More sharing options...
speedi Posted May 5, 2008 Author Share Posted May 5, 2008 You can use netsh: 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! Link to comment Share on other sites More sharing options...
speedi Posted May 5, 2008 Author Share Posted May 5, 2008 You can use netsh: netsh interface ip add address "local area connection" gateway=100.1.1.5 gwmetric=2 Question: What does the gwmetric=2 accomplish???? Thanks! Link to comment Share on other sites More sharing options...
weaponx Posted May 5, 2008 Share Posted May 5, 2008 (edited) 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 May 5, 2008 by weaponx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now