netsh set ip address

cmd命令下,可输入netsh回车,输入命令+空格+?获取帮助。例如:netsh>interface ?
以下是bat脚本

netsh interface ipv4 set address name=”本地连接” static 192.168.10.198 255.255.255.0 192.168.10.1
netsh interface ipv4 set dnsservers “本地连接” static 61.253.164.18 primary
netsh interface ipv4 add dnsservers “本地连接” 211.98.2.4 2
pause

 

This entry was posted in Computer. Bookmark the permalink.

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