Solved

Command Live Instruction to change IP Address - Windows 7

Posted on 2013-11-12
2
460 Views
Last Modified: 2013-11-12
Say,

I wish to change the gateway of my Windows 7 PC using command line instruction. From time to time i need to choose a different router and keep looking for quick & simple ways to achieve this - how can i do it?

TX
0
Comment
Question by:shaunwingin
2 Comments
 
LVL 83

Expert Comment

by:oBdA
ID: 39643820
You can do that with netsh.exe (see http://technet.microsoft.com/en-us/library/bb490943.aspx); replace "Ethernet" with the name of the card you want to configzure, and 1.2.3.4 obviously with your gateway address:
netsh.exe interface ip set address name="Ethernet" gateway=1.2.3.4

Open in new window

0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 39643834
Or for temporary changes I would normally change the routing table and keep your gateway the same:

route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 X.X.X.X

Use this to see the results:

route print

That will need to be run as admin, e.g. a quick batch file:

@echo off
route print | find " 0.0.0.0"
Set Gateway=1.2.3.4
set /p Gateway=Enter new gateway - press return for %gateway%:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 %gateway%

Steve
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now