Script for network configuration

Published 07 April 05 09:46 AM

This is a simple batch to force a static IP address on my machines.

ECHO interface ip > "%temp%\z.netsh"
ECHO set address "Local Area Connection" static 192.168.100.173 255.255.255.0 192.168.100.1 3 >> "%temp%\z.netsh"
ECHO set dns "Local Area Connection" static 151.99.125.1 >> "%temp%\z.netsh"
ECHO add dns "Local Area Connection" 151.99.0.100 >> "%temp%\z.netsh"

netsh -f "%temp%\z.netsh"

pause

Useful when you have to change network often... and there is no DHCP server.

by giuliov
Filed under:

Comments

# Paul M said on April 7, 2005 11:46 AM:
Hey, this is nifty!

Do you have any further links to other simple netsh examples?
New Comments to this post are disabled

This Blog

Syndication

Page view tracker