|
pwsh 脚本(管理员权限),windows 高级防火墙屏蔽 exe 出站流量
$folderPath = "C:\360zippath"
Get-ChildItem -Path $folderPath -Filter *.exe -Recurse | ForEach-Object {
$ruleName = "Block " + $_.Name
$exePath = $_.FullName
New-NetFirewallRule -DisplayName $ruleName -Direction Outbound -Program $exePath -Action Block
} |