Jump to content

Recommended Posts

Posted

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....!

Posted

You can use netsh:

netsh interface ip add address "local area connection" gateway=100.1.1.5 gwmetric=2
Posted

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!

Posted

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!

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
  • Recently Browsing   0 members

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