设置为DHCP
netsh interface ipv4 set address name="office" source=dhcp
netsh interface ipv4 set dns name="office" source=dhcp
设置为STATIC
netsh interface ipv4 set address "office" source=static addr=192.168.4.249 mask=255.255.255.0
netsh interface ipv4 set dns "office" source=static addr=172.28.0.2
自动关机
@echo off
::at 20:35 /every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "Too late,it's time to get off work!"
at 20:45 /every:M,T,W,Th,F,S,Su shutdown -s -f
echo Done!
pause&end
route添加与删除
route delete -p 0.0.0.0 mask 0.0.0.0 192.168.4.250
route add -p 192.168.0.246 mask 255.255.255.255 192.168.4.250 if 10
netsh interface ipv4 add address "test" 192.168.3.168 255.255.255.0
route add -p 192.168.1.1 mask 255.255.255.255 192.168.0.234 if 12