How to change gateway settings using netsh
Hi, I've a secondary gateway set up for use by some machines on my network. Previously, on XP boxes, the following command line was all I needed to change the gateway setting: netsh interface ip set address name="Local Area Connection" gateway=10.0.0.54 gwmetric=1 However when I try and use it with Windows 7, I get a syntax not valid message. I've tried to amend to match the new w7 syntax without success. Anyone had any success using it to set up a standard command that can be run on multiple machines without the need to specify an IP address? Thanks :)
June 21st, 2010 2:26pm

Not having much luck - getting a "The requested operation requires elevation" response. Tried experimenting with the route command line, but unsuccessful. :(
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2010 2:58pm

Hello guys, I also need a script to change the gateway only on my network, and the example here above works fine on my Win 7 64bit. The only problem is that if I only change the GW I loose my static IP address, and windows auto assign one of its default pool (169.254.xxx.xxx). Obviously I want to keep my original IP address and only change the GW, can somebody tell me how can I do it?
December 9th, 2010 11:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics