The function of the following script is to modify existing firewall rules to allow 192.168.0.0/16,10.0.0.0/8 remote Windows system; (Save as BAT file to run)
@echo off echo "Start Windows Firewall ..." netsh advfirewall set allprofiles state on echo "set Remote Desktop (TC p-in) ' s remoteip= ' 192.168.0.0/16,10.0.0.0/8 ' "netsh advfirewall firewall set rule name=" Remote Desktop (tcp-in) "New Re moteip= "192.168.0.0/16,10.0.0.0/8" echo "Set Remote Desktop-remotefx (tcp-in) ' s remoteip= ' 192.168.0.0/16,10.0.0.0/8 ' "netsh advfirewall firewall set rule name=" Remote Desktop-remotefx (tcp-in) "New remoteip=" 192.168.0.0/16,10.0.0.0/8 "Pause
netsh command reference URL: http://msdn.microsoft.com/zh-cn/library/cc778925 (v=ws.10). aspx
This article is from the "Margin with Wish" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1582849
Example of the Netsh management firewall for batch processing