Solved

Command Live Instruction to change IP Address - Windows 7

Posted on 2013-11-12
2
472 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Recursively Delete Files 5 65
Windows Mail question 15 42
how to run this deletion request 4 10
Remnants of old Homegroup persist 8 10
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on 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…

919 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