Change your ip and dns using netsh easily


Sometimes i am connecting different networks at home,school,work or a cafe and every connections are different and needed different  ip configuration some of static other dinamic . if you don’t like in this situation netsh can help you.

you can save save netsh consol command into a batch file and just run it when you needed to change your configuration.

for change ip

Usage:
netsh interface ip set address “Local Area Connection” staticipaddr subnetmask gateway metric

Example:
netsh interface ip set address “Local Area Connection” static 192.168.0.10 255.255.255.0 192.168.0.1 1
netsh interface ip set address “Local Area Connection” dhcp

Change dns example:
netsh interface ip set dns “Local Area Connection” static 192.168.0.200

Change dns as using dhcp
netsh interface ip set dns “Local Area Connection” dhcp

That’s it…

Advertisements

About bpostaci
Escalation Engineer in Microsoft.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: