Monday, September 13, 2010

Chang IP setting using CLI on Windows

Today I came across a way to set IP details on a Windows machine using CLI, and I just want to share it. For example, you can change the IP of a machine to 10.1.1.2 with subnet mask of 255.255.255.0 and gateway of 10.1.1.1 by:

netsh interface ip set address local static 10.1.1.2 255.255.255.0 10.1.1.1 1

The full usage can be found out by typing below in a command prompt:

netsh interface set interface

No comments: