Jump to content

need a method to change IP gateway only by script


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...