newswan 当前离线
上尉
TOP
wh123wh123 当前离线
六级士官
$program = "D:\program files\mobaxterm\root\slash\bin\xwin_mobax.exe" New-NetFirewallRule -DisplayName "bbb" -Profile Private,Public -Direction Outbound -Program $program -Action block $count = 0 do { $count += 1 write-host "count:" $count Enable-NetFirewallRule -DisplayName "bbb" start-sleep 5 disable-NetFirewallRule -DisplayName "bbb" start-sleep 8 } while {$true}复制代码
netsh advfirewall set domainprofile firewallpolicy blockinbound,AllowOutbound netsh advfirewall set privateprofile firewallpolicy blockinbound,AllowOutbound netsh advfirewall set publicprofile firewallpolicy blockinbound,AllowOutbound复制代码