Monday, September 8, 2008

網路設定管理 netsh

快速切換動態和固定的範例

如果把netsh的命令,令外寫成檔案用 netsh -f blah.txt 效能會更好
只是要多一個檔案很懶...

dynamic.bat
netsh interface ip set address 無線網路連線 dhcp
netsh interface ip set dns 無線網路連線 dhcp


static.bat
netsh interface ip set address "無線網路連線" static 192.168.1.100 255.255.255.0 192.168.1.254 auto
netsh interface ip set dns "無線網路連線" static 168.95.192.1 none
netsh interface ip add dns "無線網路連線" 168.95.1.1

No comments: