Bad boy Warrior Posted May 14, 2007 Share Posted May 14, 2007 Hello allLooking for a quick solution to this. I want to change the default gateway on all the PCs (running XP) from what it is to another address. I dont think you can do this by GP and unforunately we dont have DHCP setup so i guess its got to be done by script.Can anyone help here?Thanks Link to comment Share on other sites More sharing options...
druiddk Posted May 14, 2007 Share Posted May 14, 2007 Hey Bad Boy You can do this using the netsh command. It should be something in the lines of:netsh interface ipv4 set address "Local area connection" gateway BLAH BLAH :-) Link to comment Share on other sites More sharing options...
Bad boy Warrior Posted May 14, 2007 Author Share Posted May 14, 2007 (edited) Thanks strangely when i get to the netsh interface> prompt, it doesnt recongnise ipv4 - but ipv6 s listed when i type "help", kind of lost hereAlso i cant run this as a batch script. I think i need something similar to sendKeys so when the script sees Netsh it presses enter to get into the sub text for interface (think SendKeys is for vbs)- maybe im wrong but some guidance needed here.Thank you Edited May 14, 2007 by Bad boy Warrior Link to comment Share on other sites More sharing options...
Sonic Posted May 14, 2007 Share Posted May 14, 2007 Hey Bad Boy You can do this using the netsh command. It should be something in the lines of:netsh interface ipv4 set address "Local area connection" gateway BLAH BLAH :-)I think you use vista, isn't it ?For WinXP, I use that code netsh interface ip set address name="Local Area Connection" static IP MASK GATEWAYnetsh interface ip set dns name="Local Area Connection" static DNSReplace IP by IP adress of the machineReplace MASK by maskReplace GATEWAY by ip gateway adressReplace DNS by ip of dns Link to comment Share on other sites More sharing options...
Bad boy Warrior Posted May 14, 2007 Author Share Posted May 14, 2007 (edited) Hey Bad Boy You can do this using the netsh command. It should be something in the lines of:netsh interface ipv4 set address "Local area connection" gateway BLAH BLAH :-)I think you use vista, isn't it ?For WinXP, I use that code netsh interface ip set address name="Local Area Connection" static IP MASK GATEWAYnetsh interface ip set dns name="Local Area Connection" static DNSReplace IP by IP adress of the machineReplace MASK by maskReplace GATEWAY by ip gateway adressReplace DNS by ip of dnsIf your asking me if i use Vista (due to my question from previous post) - then yes and no by that i mean we do have vista but the problem is only relating to xp PCs - heres another twist to the problem these PCs use static IP addresses so i really dont want to touch that part and only the Gateway config - is that possible?If it is possible do i need to run netsh interface ip set dns name="Local Area Connection" static DNS as the DNS config is fine??Thanks Edited May 14, 2007 by Bad boy Warrior 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