Windows network script

Today i have discovered a very usefull script to manage network connection under Windows XP/Vista/7. I know that this is maybe obvoius but I want to share that info.

First is a script for automatically obtaining IP adres:

netsh interface ip set addres name=”Default network connection” source=dhcp
netsh interface ip set dns “Default network connection” source=dhcp
netsh interface ip set wins name=”Default network connection” source=dhcp

Second one is for static IP configuration”

netsh interface ip set address name=”Default network connection” source=static addr=xxx.xxx.xxx.xxx mask=xxx.xxx.xxx.xxx gateway=xxx.xxx.xxx.xxx gwmetric=1
netsh interface ip set dns “Default network connection” static xxx.xxx.xxx.xx

Of course you should replace the xxx.xxx.xxx.xxx with your IP configuration 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

This website stores some user agent data. These data are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to opt-out of any future tracking, a cookie will be set up in your browser to remember this choice for one year. I Agree, Deny
566