Link to home
Start Free TrialLog in
Avatar of shirwaziri
shirwaziri

asked on

How to change multiple PC's gateways in one shot, possible a script of some sort

I currently have a script that will change a computers gateway by double clicking on the batch file that I created.  Very simple batch file script, i have pasted it below.

netsh interface ip set address name="Local Area Connection" gateway=192.168.0.1 gwmetric=0
                                                                                                                      ^
We have several gateways in our network, for various reasons.  But, I would like to change 10 computers gateways at one shot.  Is there any guru out there that can help we.  Even If you have changed just two or more PC's gateway by simplfying for users.  Your help will be gratiously appreciated. Also, if there is anyway possible for this to happen, where a group policy, preferably a script, or some command.  Please let me know.

Thank you,


Avatar of Naser Gabaj
Naser Gabaj
Flag of United States of America image

Greetings shirwaziri,

Check this please:

http://redmondmag.com/columns/article.asp?EditorialsID=427

Good Luck!

Naser
ASKER CERTIFIED SOLUTION
Avatar of MCPJoe
MCPJoe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dark_King
Dark_King

You cold use your simple batch script and run it from login script.
You cold trigger it with “user name” or something like that.

And it should be possibly to run from GPO.


Running CMD command like this from script you need to call it like this.

cmd.exe /c netsh interface ip set address name="Local Area Connection" gateway=192.168.0.1 gwmetric=0