直接看範例:
netsh interface ip set address name="區域連線" source=dhcp
netsh interface ip set dns name="區域連線" source=dhcp
netsh interface ip set address name="區域連線" static 192.168.0.1 255.255.255.0 192.168.0.254 1
netsh interface ip set dns name="區域連線" static 192.168.0.254
netsh interface ip add dns name="區域連線" 8.8.8.8
當然用手輸入這麼一大串肯定輸給按GUI。寫成批次檔點兩下自動執行才好用。